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:
@@ -168,7 +168,13 @@ func (f *ExprField) Write(c *Context, prefix string) {
|
||||
|
||||
// Value field
|
||||
func (f *ValueField) Define(c *Context) {
|
||||
if f.MaskComment != "" {
|
||||
c.PutComment(f.MaskComment)
|
||||
}
|
||||
c.Putln("%s %s", f.MaskName, f.SrcType())
|
||||
if f.ListComment != "" {
|
||||
c.PutComment(f.ListComment)
|
||||
}
|
||||
c.Putln("%s []uint32", f.ListName)
|
||||
}
|
||||
|
||||
@@ -197,6 +203,9 @@ func (f *ValueField) Write(c *Context, prefix string) {
|
||||
|
||||
// Switch field
|
||||
func (f *SwitchField) Define(c *Context) {
|
||||
if f.Comment != "" {
|
||||
c.PutComment(f.Comment)
|
||||
}
|
||||
c.Putln("%s []uint32", f.Name)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user