diff python/c3/visitor.py @ 176:5fd02aa38b42

Added while loop code generation
author Windel Bouwman
date Sat, 20 Apr 2013 12:00:51 +0200
parents ee0d30533dae
children 46d62dadd61b
line wrap: on
line diff
--- a/python/c3/visitor.py	Fri Apr 19 22:15:54 2013 +0200
+++ b/python/c3/visitor.py	Sat Apr 20 12:00:51 2013 +0200
@@ -40,6 +40,9 @@
       elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]:
          # Those nodes do not have child nodes.
          pass
+      elif type(node) is WhileStatement:
+         self.visit(node.condition)
+         self.visit(node.dostatement)
       else:
          print('UNK visit "{0}"'.format(node))
       self.f2(node)