pytholite/compiler: fix handling of constants
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 9 Nov 2012 19:17:57 +0000 (20:17 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 9 Nov 2012 19:17:57 +0000 (20:17 +0100)
migen/pytholite/compiler.py

index eebe247942623a25b005025f7db4c7e879270a13..11669946425e59127b8a9bee5766147fd809894e 100644 (file)
@@ -229,7 +229,7 @@ class _Compiler:
                return r
        
        def visit_expr_num(self, node):
-               return node.n
+               return Constant(node.n)
 
 # like list.index, but using "is" instead of comparison
 def _index_is(l, x):