diff --git a/lexer/token.go b/lexer/token.go index f74e575..06e26c3 100644 --- a/lexer/token.go +++ b/lexer/token.go @@ -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 diff --git a/parser/tree-tostring.go b/parser/tree-tostring.go index 91667d8..4ce9a14 100644 --- a/parser/tree-tostring.go +++ b/parser/tree-tostring.go @@ -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 } diff --git a/parser/tree.go b/parser/tree.go index aec04d4..8d247c7 100644 --- a/parser/tree.go +++ b/parser/tree.go @@ -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 {