Add interface section to tree

This commit is contained in:
Sasha Koshka 2022-08-23 10:56:37 -04:00
parent f95c7e0b1c
commit cd55a0ad8d
1 changed files with 20 additions and 0 deletions

View File

@ -14,6 +14,7 @@ type SyntaxTree struct {
typeSections map[string] *TypeSection typeSections map[string] *TypeSection
objtSections map[string] *ObjtSection objtSections map[string] *ObjtSection
enumSections map[string] *EnumSection enumSections map[string] *EnumSection
faceSections map[string] *FaceSection
dataSections map[string] *DataSection dataSections map[string] *DataSection
} }
@ -203,3 +204,22 @@ type EnumSection struct {
// TODO: order matters here we need to store these in an array // TODO: order matters here we need to store these in an array
members map[string] Argument members map[string] Argument
} }
// FaceBehavior represents a behavior of an interface section.
type FaceBehavior struct {
location file.Location
name string
inputs []Declaration
outputs []Declaration
}
// FaceSection represents an interface type section.
type FaceSection struct {
location file.Location
name string
what Type
permission types.Permission
behaviors map[string] FaceBehavior
}