Object sections now parse members into array

This commit is contained in:
Sasha Koshka 2022-08-24 20:19:14 -04:00
parent 067bf2f4df
commit cd528552c8

View File

@ -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 }
}
}