diff python/c3/visitor.py @ 166:da0087b82fbe

Improved type checking
author Windel Bouwman
date Fri, 22 Mar 2013 16:15:31 +0100
parents 8104fc8b5e90
children 0b5b2ee6b435
line wrap: on
line diff
--- a/python/c3/visitor.py	Fri Mar 22 15:12:38 2013 +0100
+++ b/python/c3/visitor.py	Fri Mar 22 16:15:31 2013 +0100
@@ -35,7 +35,9 @@
       elif type(node) is Binop:
          self.visit(node.a)
          self.visit(node.b)
-      elif type(node) in [EmptyStatement, Constant, VariableUse, Variable, Literal, FunctionType]:
+      elif type(node) is Constant:
+         self.visit(node.value)
+      elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]:
          # Those nodes do not have child nodes.
          pass
       else: