Parser calls ParseDataSection
This commit is contained in:
parent
8b28fe5a4c
commit
614b5664fc
@ -9,6 +9,13 @@ func (parser *ParsingOperation) parseBody () (err error) {
|
||||
|
||||
switch parser.token.Value().(string) {
|
||||
case "data":
|
||||
var section *DataSection
|
||||
section, err = parser.parseDataSection()
|
||||
if err != nil { return }
|
||||
if parser.tree.dataSections == nil {
|
||||
parser.tree.dataSections = make(map[string] *DataSection)
|
||||
}
|
||||
parser.tree.dataSections[section.name] = section
|
||||
case "type":
|
||||
case "face":
|
||||
case "enum":
|
||||
|
@ -1,6 +1,9 @@
|
||||
package parser
|
||||
|
||||
// parseData parses a data section
|
||||
func (parser *ParsingOperation) parseData () (err error) {
|
||||
func (parser *ParsingOperation) parseDataSection () (
|
||||
section *DataSection,
|
||||
err error,
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ type SyntaxTree struct {
|
||||
author string
|
||||
|
||||
requires []string
|
||||
dataSections []DataSection
|
||||
dataSections map[string] *DataSection
|
||||
}
|
||||
|
||||
// Identifier represents a chain of arguments separated by a dot.
|
||||
|
Reference in New Issue
Block a user