This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
arf/analyzer/table.go

30 lines
633 B
Go

package analyzer
// locator uniquely identifies a section in the section table.
type locator struct {
modulePath string
name string
}
// SectionTable stores a list of semantically analized sections from one module,
// and all sections that it requires from other modules.
type SectionTable map[locator] Section
// SectionKind differentiates Section interfaces.
type SectionKind int
const (
SectionKindType = iota
SectionKindObjt
SectionKindEnum
SectionKindFace
SectionKindData
SectionKindFunc
)
// Section is a semantically analyzed section.
type Section interface {
Kind () (kind SectionKind)
Name () (name string)
}