Created base for type section parsing
This commit is contained in:
parent
bc9beb0317
commit
5c2a7aeb07
@ -21,6 +21,14 @@ func (parser *ParsingOperation) parseBody () (err error) {
|
|||||||
parser.tree.dataSections[section.name] = section
|
parser.tree.dataSections[section.name] = section
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
case "type":
|
case "type":
|
||||||
|
var section *TypeSection
|
||||||
|
section, err = parser.parseTypeSection()
|
||||||
|
if parser.tree.typeSections == nil {
|
||||||
|
parser.tree.typeSections =
|
||||||
|
make(map[string] *TypeSection)
|
||||||
|
}
|
||||||
|
parser.tree.typeSections[section.name] = section
|
||||||
|
if err != nil { return }
|
||||||
case "face":
|
case "face":
|
||||||
case "enum":
|
case "enum":
|
||||||
case "func":
|
case "func":
|
||||||
|
@ -11,6 +11,7 @@ type SyntaxTree struct {
|
|||||||
author string
|
author string
|
||||||
|
|
||||||
requires []string
|
requires []string
|
||||||
|
typeSections map[string] *TypeSection
|
||||||
dataSections map[string] *DataSection
|
dataSections map[string] *DataSection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
parser/type.go
Normal file
8
parser/type.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package parser
|
||||||
|
|
||||||
|
func (parser *ParsingOperation) parseTypeSection () (
|
||||||
|
section *TypeSection,
|
||||||
|
err error,
|
||||||
|
) {
|
||||||
|
return
|
||||||
|
}
|
Reference in New Issue
Block a user