comparison python/ppci/c3/codegenerator.py @ 353:b8ad45b3a573

Started with strings
author Windel Bouwman
date Sun, 09 Mar 2014 18:49:10 +0100
parents d1ecc493384e
children 5477e499b039
comparison
equal deleted inserted replaced
352:899ae3aea803 353:b8ad45b3a573
300 expr.typ = expr.to_type 300 expr.typ = expr.to_type
301 return ar 301 return ar
302 else: 302 else:
303 raise SemanticError('Cannot cast {} to {}' 303 raise SemanticError('Cannot cast {} to {}'
304 .format(from_type, to_type), expr.loc) 304 .format(from_type, to_type), expr.loc)
305 305
306 def gen_function_call(self, expr): 306 def gen_function_call(self, expr):
307 """ Generate code for a function call """ 307 """ Generate code for a function call """
308 # Evaluate the arguments: 308 # Evaluate the arguments:
309 args = [self.genExprCode(e) for e in expr.args] 309 args = [self.genExprCode(e) for e in expr.args]
310 # Check arguments: 310 # Check arguments: