diff python/ppci/c3/codegenerator.py @ 312:2c9768114877

Added cool logging formatter
author Windel Bouwman
date Mon, 16 Dec 2013 17:58:15 +0100
parents ff665880a6b0
children 04cf4d26a3bc
line wrap: on
line diff
--- a/python/ppci/c3/codegenerator.py	Mon Dec 16 12:49:24 2013 +0100
+++ b/python/ppci/c3/codegenerator.py	Mon Dec 16 17:58:15 2013 +0100
@@ -265,7 +265,7 @@
             if type(expr.val) in typemap:
                 expr.typ = self.pkg.scope[typemap[type(expr.val)]]
             else:
-                raise SemanticError('Unknown literal type {}'.format(expr.val))
+                raise SemanticError('Unknown literal type {}'.format(expr.val), expr.loc)
             return ir.Const(expr.val)
         elif type(expr) is ast.TypeCast:
             return self.gen_type_cast(expr)