diff --git a/python_arborist.py b/python_arborist.py index ead9916055acfde85b767767163e7c9af06ce2db..4b2080dd12095c9a8c84c76f184280eca86bfeeb 100644 --- a/python_arborist.py +++ b/python_arborist.py @@ -367,6 +367,16 @@ class TreeNode: return str(self.language_element) + str(self.subnodes) +def walk_the_tree(tree, level = 0): + if tree == None: + return + + print(" " * level + hex(tree.language_element)) + for subnode in tree.subnodes: + walk_the_tree(subnode, level + 1) + the_tree = deserializer(serialized_tree_final) -print(the_tree) \ No newline at end of file +print(the_tree) + +walk_the_tree(the_tree) \ No newline at end of file