From 5110ff445ddb5a09a13e17b187c06d2dc3a7d52a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 2 Mar 2018 11:49:19 +0100 Subject: pkg/compiler: switch attributes from Ident to Type This allows parametrized attributes like size[10]. But this is not used for now. --- pkg/ast/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/ast/parser.go') 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) } -- cgit mrf-deployment