Object sections now parse members into array

pull/9/head
Sasha Koshka 5 months ago
parent 067bf2f4df
commit cd528552c8

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