Mercurial > lcfOS
diff python/c3/astnodes.py @ 167:0b5b2ee6b435
Added 2 unit tests
author | Windel Bouwman |
---|---|
date | Fri, 22 Mar 2013 17:40:13 +0100 |
parents | da0087b82fbe |
children | 5fd02aa38b42 |
line wrap: on
line diff
--- a/python/c3/astnodes.py Fri Mar 22 16:15:31 2013 +0100 +++ b/python/c3/astnodes.py Fri Mar 22 17:40:13 2013 +0100 @@ -26,11 +26,11 @@ return '{0}'.format(self.name) class FunctionType(Type): - def __init__(self, parameters, returntype): - self.parameters = parameters + def __init__(self, parametertypes, returntype): + self.parametertypes = parametertypes self.returntype = returntype def __repr__(self): - params = ','.join([str(v) for v in self.parameters]) + params = ', '.join([str(v) for v in self.parametertypes]) return '{1} f({0})'.format(params, self.returntype) class DefinedType(Type): @@ -140,7 +140,7 @@ def __repr__(self): return 'ASSIGNMENT' -class ProcedureCall(Node): +class FunctionCall(Node): def __init__(self, proc, args): self.proc = proc self.args = args