Altered tree so that object members are stored in an array

This commit is contained in:
Sasha Koshka 2022-08-24 20:09:57 -04:00
parent 777c8df6a4
commit 067bf2f4df
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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