Mercurial > lcfOS
comparison python/ppci/c3/codegenerator.py @ 336:d1ecc493384e
Added spiffy armtoken class for bit fiddeling. Added cool test that checks for build repeatability
author | Windel Bouwman |
---|---|
date | Wed, 19 Feb 2014 22:32:15 +0100 |
parents | 6f4753202b9a |
children | b8ad45b3a573 |
comparison
equal
deleted
inserted
replaced
335:582a1aaa3983 | 336:d1ecc493384e |
---|---|
310 # Check arguments: | 310 # Check arguments: |
311 tg = self.resolveSymbol(expr.proc) | 311 tg = self.resolveSymbol(expr.proc) |
312 if type(tg) is not ast.Function: | 312 if type(tg) is not ast.Function: |
313 raise SemanticError('cannot call {}'.format(tg)) | 313 raise SemanticError('cannot call {}'.format(tg)) |
314 ftyp = tg.typ | 314 ftyp = tg.typ |
315 fname = tg.name | 315 fname = tg.package.name + '_' + tg.name |
316 ptypes = ftyp.parametertypes | 316 ptypes = ftyp.parametertypes |
317 if len(expr.args) != len(ptypes): | 317 if len(expr.args) != len(ptypes): |
318 raise SemanticError('{} requires {} arguments, {} given' | 318 raise SemanticError('{} requires {} arguments, {} given' |
319 .format(fname, len(ptypes), len(expr.args)), expr.loc) | 319 .format(fname, len(ptypes), len(expr.args)), expr.loc) |
320 for arg, at in zip(expr.args, ptypes): | 320 for arg, at in zip(expr.args, ptypes): |