Mercurial > lcfOS
diff python/ppci/c3/codegenerator.py @ 311:ff665880a6b0
Added testcase for kernel and userspace
author | Windel Bouwman |
---|---|
date | Mon, 16 Dec 2013 12:49:24 +0100 |
parents | 2e7f55319858 |
children | 2c9768114877 |
line wrap: on
line diff
--- a/python/ppci/c3/codegenerator.py Fri Dec 13 14:10:10 2013 +0100 +++ b/python/ppci/c3/codegenerator.py Mon Dec 16 12:49:24 2013 +0100 @@ -180,7 +180,7 @@ .format(expr.a.typ, expr.b.typ), expr.loc) self.emit(ir.CJump(ta, expr.op, tb, bbtrue, bbfalse)) else: - raise NotImplementedError('Unknown condition {}'.format(expr)) + raise SemanticError('non-bool: {}'.format(expr.op), expr.loc) expr.typ = self.boolType elif type(expr) is ast.Literal: self.genExprCode(expr)