From cb2264977a1570ebf781f91ec8652259bdd6c801 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sat, 20 Aug 2022 13:24:56 -0400 Subject: [PATCH] Added object sections to the tree for real lol --- parser/body.go | 9 +++++++++ parser/tree.go | 1 + 2 files changed, 10 insertions(+) diff --git a/parser/body.go b/parser/body.go index 3f181d9..da8f75c 100644 --- a/parser/body.go +++ b/parser/body.go @@ -29,6 +29,15 @@ func (parser *ParsingOperation) parseBody () (err error) { } parser.tree.typeSections[section.name] = section if err != nil { return } + case "objt": + var section *ObjtSection + section, err = parser.parseObjtSection() + if parser.tree.typeSections == nil { + parser.tree.typeSections = + make(map[string] *TypeSection) + } + parser.tree.objtSections[section.name] = section + if err != nil { return } case "face": case "enum": case "func": diff --git a/parser/tree.go b/parser/tree.go index a13a7e5..c1b5e74 100644 --- a/parser/tree.go +++ b/parser/tree.go @@ -12,6 +12,7 @@ type SyntaxTree struct { requires []string typeSections map[string] *TypeSection + objtSections map[string] *ObjtSection dataSections map[string] *DataSection }