From 3e9ed4eac6a953b2616bcf129b515a857271acdc Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sat, 29 Sep 2018 21:42:23 +0200 Subject: xgbgen: process elements Most of XCB documentation now ends up in Go sources, although the end result is of mixed quality. --- nexgb/xgbgen/go.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nexgb/xgbgen/go.go') diff --git a/nexgb/xgbgen/go.go b/nexgb/xgbgen/go.go index 87b5028..8a4080d 100644 --- a/nexgb/xgbgen/go.go +++ b/nexgb/xgbgen/go.go @@ -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) } -- cgit v1.2.3-70-g09d2