diff options
Diffstat (limited to 'src/tparse/tree.go')
-rw-r--r-- | src/tparse/tree.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tparse/tree.go b/src/tparse/tree.go index 02c8171..ed19e6d 100644 --- a/src/tparse/tree.go +++ b/src/tparse/tree.go @@ -194,7 +194,7 @@ func parseType(tokens *[]Token, tok, max int, param bool) (Node, int) { errOut("Error: unexpected token when parsing type", t) } - working.Sub = append(working.Sub, Node{Parent: working}) + makeParent(working, Node{}) working = &(working.Sub[0]) } @@ -220,7 +220,6 @@ func parseValue(tokens *[]Token, tok, max int) (Node, int) { func MakeTree(tokens *[]Token, file string) Node { out := Node{} out.Data = Token{9, file, 0, 0} - out.Parent = &out tmp := Node{} working := &tmp |