diff options
author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-04-30 02:44:31 -0400 |
---|---|---|
committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-04-30 02:44:31 -0400 |
commit | 2a2d8653b3a7918dfb00dcca8937b0e878279c70 (patch) | |
tree | 39505670885d7ae838f9c306070336db4685e078 /nexgb/xgbgen/xml_expression.go | |
parent | 05d8ec6a16acf88c5ae7521d86131f5ea7f9b4e4 (diff) | |
download | haven-2a2d8653b3a7918dfb00dcca8937b0e878279c70.tar.gz haven-2a2d8653b3a7918dfb00dcca8937b0e878279c70.tar.xz haven-2a2d8653b3a7918dfb00dcca8937b0e878279c70.zip |
gofmt
Diffstat (limited to 'nexgb/xgbgen/xml_expression.go')
-rw-r--r-- | nexgb/xgbgen/xml_expression.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nexgb/xgbgen/xml_expression.go b/nexgb/xgbgen/xml_expression.go index 57ff62e..2989668 100644 --- a/nexgb/xgbgen/xml_expression.go +++ b/nexgb/xgbgen/xml_expression.go @@ -13,14 +13,14 @@ type XMLExpression struct { Exprs []*XMLExpression `xml:",any"` Data string `xml:",chardata"` - Op string `xml:"op,attr"` - Ref string `xml:"ref,attr"` + Op string `xml:"op,attr"` + Ref string `xml:"ref,attr"` } func newValueExpression(v uint) *XMLExpression { return &XMLExpression{ XMLName: xml.Name{Local: "value"}, - Data: fmt.Sprintf("%d", v), + Data: fmt.Sprintf("%d", v), } } @@ -87,22 +87,22 @@ func (e *XMLExpression) Eval() uint { e.Data) } if bit < 0 || bit > 31 { - log.Panicf("A 'bit' literal must be in the range [0, 31], but " + + log.Panicf("A 'bit' literal must be in the range [0, 31], but "+ " is %d", bit) } return 1 << uint(bit) case "fieldref": - log.Panicf("Cannot compute concrete value of 'fieldref' in " + + log.Panicf("Cannot compute concrete value of 'fieldref' in "+ "expression '%s'.", e) case "enumref": - log.Panicf("Cannot compute concrete value of 'enumref' in " + + log.Panicf("Cannot compute concrete value of 'enumref' in "+ "expression '%s'.", e) case "sumof": - log.Panicf("Cannot compute concrete value of 'sumof' in " + + log.Panicf("Cannot compute concrete value of 'sumof' in "+ "expression '%s'.", e) } - log.Panicf("Unrecognized tag '%s' in expression context. Expected one of " + + log.Panicf("Unrecognized tag '%s' in expression context. Expected one of "+ "op, fieldref, value, bit, enumref, unop, sumof or popcount.", e.XMLName.Local) panic("unreachable") |