Mercurial > lcfOS
diff python/c3/codegenerator.py @ 259:ac603eb66b63
Added function call
author | Windel Bouwman |
---|---|
date | Mon, 05 Aug 2013 20:41:25 +0200 |
parents | 7416c923a02a |
children | 444b9df2ed99 |
line wrap: on
line diff
--- a/python/c3/codegenerator.py Mon Aug 05 19:46:11 2013 +0200 +++ b/python/c3/codegenerator.py Mon Aug 05 20:41:25 2013 +0200 @@ -211,15 +211,15 @@ else: raise NotImplementedError("not implemented") elif type(expr) is astnodes.FunctionCall: - tmp = self.builder.newTmp("res") - args = [] - for arg in expr.args: + tmp = self.builder.newTmp("res") + args = [] + for arg in expr.args: ar = self.genExprCode(arg) args.append(ar) - fn = self.funcMap[expr.proc] - ins = ir.Call(fn, args, tmp) - self.builder.addIns(ins) - return tmp + fn = self.funcMap[expr.proc] + ins = ir.Call(fn, args, tmp) + self.builder.addIns(ins) + return tmp else: - raise NotImplementedError('Unknown expr {}'.format(expr)) + raise NotImplementedError('Unknown expr {}'.format(expr))