SectionKind has been retired
This commit is contained in:
@@ -23,36 +23,6 @@ func (tree SyntaxTree) ResolveRequire (name string) (path string, exists bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// Kind returns the section's kind (SectionKindType).
|
||||
func (section TypeSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindType
|
||||
return
|
||||
}
|
||||
|
||||
// Kind returns the section's kind (SectionKindEnum).
|
||||
func (section EnumSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindEnum
|
||||
return
|
||||
}
|
||||
|
||||
// Kind returns the section's kind (SectionKindFace).
|
||||
func (section FaceSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindFace
|
||||
return
|
||||
}
|
||||
|
||||
// Kind returns the section's kind (SectionKindData).
|
||||
func (section DataSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindData
|
||||
return
|
||||
}
|
||||
|
||||
// Kind returns the section's kind (SectionKindFunc).
|
||||
func (section FuncSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindFunc
|
||||
return
|
||||
}
|
||||
|
||||
// Length returns the amount of names in the identifier.
|
||||
func (identifier Identifier) Length () (length int) {
|
||||
length = len(identifier.trail)
|
||||
|
||||
@@ -15,22 +15,10 @@ type SyntaxTree struct {
|
||||
sections map[string] Section
|
||||
}
|
||||
|
||||
// SectionKind differentiates Section interfaces.
|
||||
type SectionKind int
|
||||
|
||||
const (
|
||||
SectionKindType = iota
|
||||
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 {
|
||||
Location () (location file.Location)
|
||||
Kind () (kind SectionKind)
|
||||
Permission () (permission types.Permission)
|
||||
Name () (name string)
|
||||
NewError (message string, kind infoerr.ErrorKind) (err error)
|
||||
|
||||
Reference in New Issue
Block a user