diff python/c3/visitor.py @ 225:1c7364bd74c7

Fixed pointer deref
author Windel Bouwman
date Thu, 11 Jul 2013 07:42:30 +0200
parents c3f1ce8b638f
children 7f18ed9b6b7e
line wrap: on
line diff
--- a/python/c3/visitor.py	Tue Jul 09 17:59:15 2013 +0200
+++ b/python/c3/visitor.py	Thu Jul 11 07:42:30 2013 +0200
@@ -47,9 +47,13 @@
             self.do(node.ex)
       elif type(node) is TypeCast:
             self.do(node.a)
+      elif type(node) is FieldRef:
+            self.do(node.base)
+      elif type(node) is Deref:
+            self.do(node.ptr)
       elif type(node) is Constant:
          self.do(node.value)
-      elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]:
+      elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType, DefinedType]:
          # Those nodes do not have child nodes.
          pass
       elif type(node) is WhileStatement: