comparison python/c3/codegenerator.py @ 249:e41e4109addd

Added current position arrow
author Windel Bouwman
date Fri, 26 Jul 2013 20:26:05 +0200
parents d3dccf12ca88
children c4370696ccc7
comparison
equal deleted inserted replaced
248:b10d46e5c8dd 249:e41e4109addd
53 else: 53 else:
54 print(s) 54 print(s)
55 55
56 def genCode(self, code): 56 def genCode(self, code):
57 assert isinstance(code, astnodes.Statement) 57 assert isinstance(code, astnodes.Statement)
58 self.builder.setLoc(code.loc)
58 if type(code) is astnodes.CompoundStatement: 59 if type(code) is astnodes.CompoundStatement:
59 for s in code.statements: 60 for s in code.statements:
60 self.genCode(s) 61 self.genCode(s)
61 elif type(code) is astnodes.Assignment: 62 elif type(code) is astnodes.Assignment:
62 re = self.genExprCode(code.rval) 63 re = self.genExprCode(code.rval)