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/token.go | |
parent | 93cdd2cb58d0d2c1058ffe3568391be556245136 (diff) |
Remove link to parent from nodes
Diffstat (limited to 'src/tparse/token.go')
-rw-r--r-- | src/tparse/token.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tparse/token.go b/src/tparse/token.go index 51a2123..182b2e0 100644 --- a/src/tparse/token.go +++ b/src/tparse/token.go @@ -26,12 +26,10 @@ type Token struct { // Node represents a node in an AST type Node struct { - Parent *Node - Data Token - Sub []Node + Data Token + Sub []Node } func makeParent(parent *Node, child Node) { - child.Parent = parent parent.Sub = append(parent.Sub, child) } |