diff python/c3/codegenerator.py @ 167:0b5b2ee6b435

Added 2 unit tests
author Windel Bouwman
date Fri, 22 Mar 2013 17:40:13 +0100
parents 9683a4cd848f
children ee0d30533dae
line wrap: on
line diff
--- a/python/c3/codegenerator.py	Fri Mar 22 16:15:31 2013 +0100
+++ b/python/c3/codegenerator.py	Fri Mar 22 17:40:13 2013 +0100
@@ -36,12 +36,12 @@
    elif type(code) is astnodes.IfStatement:
       genExprCode(bb, code.condition)
       # TODO: implement IF.
-      t1, t2 = 1,2
+      t1, t2 = 1, 2
       b = ir.BranchInstruction(t1, t2)
       bb.Instructions.append(b)
       genCode(bb, code.truestatement)
       genCode(bb, code.falsestatement)
-   elif type(code) is astnodes.ProcedureCall:
+   elif type(code) is astnodes.FunctionCall:
       ins = ir.CallInstruction('f', [])
       bb.Instructions.append(ins)
    elif type(code) is astnodes.EmptyStatement: