Enum members are now ordered

This commit is contained in:
Sasha Koshka
2022-08-24 01:16:44 -04:00
parent a5477717eb
commit 0d366964ca
4 changed files with 31 additions and 27 deletions

View File

@@ -191,9 +191,17 @@ type ObjtSection struct {
inherits Type
permission types.Permission
// TODO: order matters here we need to store these in an array
// TODO: add bitfield support (:n)
members map[string] ObjtMember
}
type EnumMember struct {
location file.Location
name string
value Argument
}
// EnumSection represents an enumerated type section.
type EnumSection struct {
location file.Location
@@ -201,8 +209,7 @@ type EnumSection struct {
what Type
permission types.Permission
// TODO: order matters here we need to store these in an array
members map[string] Argument
members []EnumMember
}
// FaceBehavior represents a behavior of an interface section.