Moved type sections into a dedicated file
This commit is contained in:
parent
744e8de794
commit
3a5086ad33
21
analyzer/type-section.go
Normal file
21
analyzer/type-section.go
Normal file
@ -0,0 +1,21 @@
|
||||
package analyzer
|
||||
|
||||
// TypeSection represents a type definition section.
|
||||
type TypeSection struct {
|
||||
sectionBase
|
||||
inherits Type
|
||||
complete bool
|
||||
}
|
||||
|
||||
// Kind returns SectionKindType.
|
||||
func (section TypeSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindType
|
||||
return
|
||||
}
|
||||
|
||||
// ToString returns all data stored within the type section, in string form.
|
||||
func (section TypeSection) ToString (indent int) (output string) {
|
||||
output += doIndent(indent, "typeSection ", section.where.ToString(), "\n")
|
||||
output += section.inherits.ToString(indent + 1)
|
||||
return
|
||||
}
|
@ -96,22 +96,3 @@ func (what Type) ToString (indent int) (output string) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// TypeSection represents a type definition section.
|
||||
type TypeSection struct {
|
||||
sectionBase
|
||||
inherits Type
|
||||
}
|
||||
|
||||
// Kind returns SectionKindType.
|
||||
func (section TypeSection) Kind () (kind SectionKind) {
|
||||
kind = SectionKindType
|
||||
return
|
||||
}
|
||||
|
||||
// ToString returns all data stored within the type section, in string form.
|
||||
func (section TypeSection) ToString (indent int) (output string) {
|
||||
output += doIndent(indent, "typeSection ", section.where.ToString(), "\n")
|
||||
output += section.inherits.ToString(indent + 1)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user