diff options
author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-03 01:00:01 -0400 |
---|---|---|
committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-03 01:00:01 -0400 |
commit | 5cdae5950c357564300c0ee3fb4dc9e7bbf4946b (patch) | |
tree | 1ca6c09455b060b9f607c3e275ac14b5c57bbdc1 /nexgb/xgbgen/translation.go | |
parent | 39507f86ab0468292c24081a80f41c1799d6b477 (diff) | |
download | haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.tar.gz haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.tar.xz haven-5cdae5950c357564300c0ee3fb4dc9e7bbf4946b.zip |
holy toldeo... things might actually be working
Diffstat (limited to 'nexgb/xgbgen/translation.go')
-rw-r--r-- | nexgb/xgbgen/translation.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nexgb/xgbgen/translation.go b/nexgb/xgbgen/translation.go index 9c7603b..fe5a52b 100644 --- a/nexgb/xgbgen/translation.go +++ b/nexgb/xgbgen/translation.go @@ -138,7 +138,7 @@ func (x *XMLEvent) Translate() *Event { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - ev.Fields[i] = field.Translate() + ev.Fields[i] = field.Translate(ev) } return ev } @@ -158,7 +158,7 @@ func (x *XMLError) Translate() *Error { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - err.Fields[i] = field.Translate() + err.Fields[i] = field.Translate(err) } return err } @@ -177,7 +177,7 @@ func (x *XMLStruct) Translate() *Struct { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - s.Fields[i] = field.Translate() + s.Fields[i] = field.Translate(s) } return s } @@ -188,7 +188,7 @@ func (x *XMLUnion) Translate() *Union { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - u.Fields[i] = field.Translate() + u.Fields[i] = field.Translate(u) } return u } @@ -202,7 +202,7 @@ func (x *XMLRequest) Translate() *Request { Reply: x.Reply.Translate(), } for i, field := range x.Fields { - r.Fields[i] = field.Translate() + r.Fields[i] = field.Translate(r) } // Address bug (or legacy code) in QueryTextExtents. @@ -230,7 +230,7 @@ func (x *XMLReply) Translate() *Reply { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - r.Fields[i] = field.Translate() + r.Fields[i] = field.Translate(r) } return r } @@ -309,7 +309,7 @@ func (x *XMLExpression) Translate() Expression { panic("unreachable") } -func (x *XMLField) Translate() Field { +func (x *XMLField) Translate(parent interface{}) Field { switch x.XMLName.Local { case "pad": return &PadField{ @@ -339,6 +339,7 @@ func (x *XMLField) Translate() Field { } case "valueparam": return &ValueField{ + Parent: parent, MaskType: newTranslation(x.ValueMaskType), MaskName: x.ValueMaskName, ListName: x.ValueListName, @@ -365,7 +366,7 @@ func (x *XMLBitcase) Translate() *Bitcase { Fields: make([]Field, len(x.Fields)), } for i, field := range x.Fields { - b.Fields[i] = field.Translate() + b.Fields[i] = field.Translate(b) } return b } |