From 91e97acd9b4eeb5bdc6c7ec1d9181ba08a176c84 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Wed, 18 Nov 2020 15:48:08 -0500 Subject: Remove link to parent from nodes --- src/tparse/token.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/tparse/token.go') 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) } -- cgit v1.2.3