The syntax tree is no longer passed by reference

This commit is contained in:
2022-09-04 22:30:14 -04:00
parent 7af575e865
commit 89834ac390
3 changed files with 4 additions and 13 deletions

View File

@@ -14,15 +14,15 @@ type ParsingOperation struct {
tokens []lexer.Token
tokenIndex int
tree *SyntaxTree
tree SyntaxTree
}
// Parse reads the files located in the module specified by modulePath, and
// converts them into an abstract syntax tree.
func Parse (modulePath string) (tree *SyntaxTree, err error) {
func Parse (modulePath string) (tree SyntaxTree, err error) {
parser := ParsingOperation {
modulePath: modulePath,
tree: &SyntaxTree {
tree: SyntaxTree {
sections: make(map[string] Section),
},
}