xgbgen: process <doc> elements

Most of XCB documentation now ends up in Go sources,
although the end result is of mixed quality.
This commit is contained in:
2018-09-29 21:42:23 +02:00
parent 0056720d05
commit 3e9ed4eac6
9 changed files with 187 additions and 24 deletions

View File

@@ -105,6 +105,7 @@ type SingleField struct {
srcName string
xmlName string
Type Type
Comment string
}
func (f *SingleField) Initialize(p *Protocol) {
@@ -255,10 +256,12 @@ func (f *ExprField) Initialize(p *Protocol) {
// integers. The mask specifies which kinds of values are in the list.
// (i.e., See ConfigureWindow, CreateWindow, ChangeWindowAttributes, etc.)
type ValueField struct {
Parent interface{}
MaskType Type
MaskName string
ListName string
Parent interface{}
MaskType Type
MaskName string
ListName string
MaskComment string
ListComment string
}
func (f *ValueField) SrcName() string {
@@ -324,6 +327,7 @@ type SwitchField struct {
MaskName string
Expr Expression
Bitcases []*Bitcase
Comment string
}
func (f *SwitchField) SrcName() string {