type-section #4

Merged
sashakoshka merged 15 commits from type-section into main 2022-08-20 02:06:45 +00:00
3 changed files with 17 additions and 0 deletions
Showing only changes of commit 5c2a7aeb07 - Show all commits

View File

@ -21,6 +21,14 @@ func (parser *ParsingOperation) parseBody () (err error) {
parser.tree.dataSections[section.name] = section
if err != nil { return }
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 "enum":
case "func":

View File

@ -11,6 +11,7 @@ type SyntaxTree struct {
author string
requires []string
typeSections map[string] *TypeSection
dataSections map[string] *DataSection
}

8
parser/type.go Normal file
View File

@ -0,0 +1,8 @@
package parser
func (parser *ParsingOperation) parseTypeSection () (
section *TypeSection,
err error,
) {
return
}