comparison python/c3/visitor.py @ 167:0b5b2ee6b435

Added 2 unit tests
author Windel Bouwman
date Fri, 22 Mar 2013 17:40:13 +0100
parents da0087b82fbe
children ee0d30533dae
comparison
equal deleted inserted replaced
166:da0087b82fbe 167:0b5b2ee6b435
22 self.visit(s) 22 self.visit(s)
23 elif type(node) is IfStatement: 23 elif type(node) is IfStatement:
24 self.visit(node.condition) 24 self.visit(node.condition)
25 self.visit(node.truestatement) 25 self.visit(node.truestatement)
26 self.visit(node.falsestatement) 26 self.visit(node.falsestatement)
27 elif type(node) is ProcedureCall: 27 elif type(node) is FunctionCall:
28 pass 28 for arg in node.args:
29 # TODO 29 self.visit(arg)
30 elif type(node) is Assignment: 30 elif type(node) is Assignment:
31 self.visit(node.lval) 31 self.visit(node.lval)
32 self.visit(node.rval) 32 self.visit(node.rval)
33 elif type(node) is ReturnStatement: 33 elif type(node) is ReturnStatement:
34 self.visit(node.expr) 34 self.visit(node.expr)