summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/compiler/compiler/visitor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/compiler/compiler/visitor.py b/Tools/compiler/compiler/visitor.py
index a6604f4..dfeda32 100644
--- a/Tools/compiler/compiler/visitor.py
+++ b/Tools/compiler/compiler/visitor.py
@@ -61,13 +61,13 @@ class ASTVisitor:
print "dispatch", className
else:
print "dispatch", className, (meth and meth.__name__ or '')
- return apply(meth, (node,) + args)
+ return meth(node, *args)
- def preorder(self, tree, visitor):
+ def preorder(self, tree, visitor, *args):
"""Do preorder walk of tree using visitor"""
self.visitor = visitor
visitor.visit = self._preorder
- self._preorder(tree)
+ self._preorder(tree, *args) # XXX *args make sense?
_preorder = dispatch