Removed debug print

This commit is contained in:
Salvo 'LtWorf' Tomaselli 2016-05-25 15:27:11 +02:00
parent 077eaa16bd
commit 57ea58e516

View File

@ -53,6 +53,17 @@ RENAME = parser.RENAME
ARROW = parser.ARROW
def find_duplicates(node, dups=None):
'''
Finds repeated subtrees in a parse
tree.
'''
if dups is None:
dups = {}
dups[str(node)] = node
def replace_leaves(node, context):
'''
Node is a parsed tree
@ -64,7 +75,6 @@ def replace_leaves(node, context):
modified to replace the node with the
subtree found in context.
'''
print(node, ' ' ,node.__class__)
if node.kind == parser.UNARY:
replace_leaves(node.child, context)
elif node.kind == parser.BINARY: