aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/translation.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen/translation.go')
-rw-r--r--nexgb/xgbgen/translation.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/nexgb/xgbgen/translation.go b/nexgb/xgbgen/translation.go
index f595e5f..d35fa88 100644
--- a/nexgb/xgbgen/translation.go
+++ b/nexgb/xgbgen/translation.go
@@ -325,12 +325,14 @@ func (x *XMLField) Translate(parent interface{}) Field {
case "pad":
return &PadField{
Bytes: x.Bytes,
+ Align: x.Align,
}
case "field":
- return &SingleField{
+ s := &SingleField{
xmlName: x.Name,
Type: newTranslation(x.Type),
}
+ return s
case "list":
return &ListField{
xmlName: x.Name,
@@ -365,6 +367,8 @@ func (x *XMLField) Translate(parent interface{}) Field {
swtch.Bitcases[i] = bitcase.Translate()
}
return swtch
+ case "required_start_align":
+ return &RequiredStartAlign{}
}
log.Panicf("Unrecognized field element: %s", x.XMLName.Local)