diff options
Diffstat (limited to 'src/tparse/token.go')
-rw-r--r-- | src/tparse/token.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tparse/token.go b/src/tparse/token.go index f923af4..51a2123 100644 --- a/src/tparse/token.go +++ b/src/tparse/token.go @@ -30,3 +30,8 @@ type Node struct { Data Token Sub []Node } + +func makeParent(parent *Node, child Node) { + child.Parent = parent + parent.Sub = append(parent.Sub, child) +} |