aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast/parser.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-02 11:49:19 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-05 12:10:27 +0100
commit5110ff445ddb5a09a13e17b187c06d2dc3a7d52a (patch)
tree4a482d23c3e284e996539a1677dee246e9e7b0a5 /pkg/ast/parser.go
parentdb01d57e9144125b368d14815d08e897ff496604 (diff)
pkg/compiler: switch attributes from Ident to Type
This allows parametrized attributes like size[10]. But this is not used for now.
Diffstat (limited to 'pkg/ast/parser.go')
-rw-r--r--pkg/ast/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/ast/parser.go b/pkg/ast/parser.go
index a7cfdbf02..b28658de8 100644
--- a/pkg/ast/parser.go
+++ b/pkg/ast/parser.go
@@ -376,9 +376,9 @@ func (p *parser) parseStruct(name *Ident) *Struct {
p.consume(tokNewLine)
}
if p.tryConsume(tokLBrack) {
- str.Attrs = append(str.Attrs, p.parseIdent())
+ str.Attrs = append(str.Attrs, p.parseType())
for p.tryConsume(tokComma) {
- str.Attrs = append(str.Attrs, p.parseIdent())
+ str.Attrs = append(str.Attrs, p.parseType())
}
p.consume(tokRBrack)
}