Altered tree so that object members are stored in an array

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

@ -45,6 +45,8 @@ const (
TokenKindPercent
TokenKindTilde
// TODO: add equal to, less than or equal to, greater than or equal to,
// not equal to
TokenKindLessThan
TokenKindLShift
TokenKindGreaterThan

@ -327,8 +327,8 @@ func (section *ObjtSection) ToString (indent int) (output string) {
section.name, ":",
section.inherits.ToString(), "\n")
for _, name := range sortMapKeysAlphabetically(section.members) {
output += section.members[name].ToString(indent + 1)
for _, member := range section.members {
output += member.ToString(indent + 1)
}
return
}

@ -192,8 +192,7 @@ type ObjtSection struct {
inherits Identifier
permission types.Permission
// TODO: order matters here we need to store these in an array
members map[string] ObjtMember
members []ObjtMember
}
type EnumMember struct {