Created Section interface

This commit is contained in:
2022-09-04 14:02:48 -04:00
parent 899f4815bc
commit ded0ce58ec
3 changed files with 57 additions and 0 deletions

View File

@@ -18,6 +18,24 @@ type SyntaxTree struct {
funcSections map[string] *FuncSection
}
// SectionKind differentiates Section interfaces.
type SectionKind int
const (
SectionKindType = iota
SectionKindObjt
SectionKindEnum
SectionKindFace
SectionKindData
SectionKindFunc
)
// Section can be any kind of section. You can find out what type of section it
// is with the Kind method.
type Section interface {
Kind () (kind SectionKind)
}
// Identifier represents a chain of arguments separated by a dot.
type Identifier struct {
locatable