From cd528552c866afd5556a3a1cf3de5e946a213a56 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 24 Aug 2022 20:19:14 -0400 Subject: [PATCH] Object sections now parse members into array --- parser/objt.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/parser/objt.go b/parser/objt.go index ca8f2db..255881b 100644 --- a/parser/objt.go +++ b/parser/objt.go @@ -13,10 +13,7 @@ func (parser *ParsingOperation) parseObjtSection () ( err = parser.expect(lexer.TokenKindName) if err != nil { return } - section = &ObjtSection { - location: parser.token.Location(), - members: make(map[string] ObjtMember), - } + section = &ObjtSection { location: parser.token.Location() } // get permission err = parser.nextToken(lexer.TokenKindPermission) @@ -68,7 +65,7 @@ func (parser *ParsingOperation) parseObjtMembers ( // add member to object section var member ObjtMember member, err = parser.parseObjtMember() - into.members[member.name] = member + into.members = append(into.members, member) if err != nil { return } } }