diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-11-18 15:48:08 -0500 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-11-18 15:48:08 -0500 |
commit | 91e97acd9b4eeb5bdc6c7ec1d9181ba08a176c84 (patch) | |
tree | 981d7c2351d06cbfbcbe646cbeee3ed4ae110016 /src/tparse/tree.go | |
parent | 93cdd2cb58d0d2c1058ffe3568391be556245136 (diff) |
Remove link to parent from nodes
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 |