diff python/c3/codegenerator.py @ 233:d3dccf12ca88

Added hexfile tests
author Windel Bouwman
date Sun, 14 Jul 2013 12:28:23 +0200
parents e621e3ba78d2
children e41e4109addd
line wrap: on
line diff
--- a/python/c3/codegenerator.py	Sun Jul 14 11:50:58 2013 +0200
+++ b/python/c3/codegenerator.py	Sun Jul 14 12:28:23 2013 +0200
@@ -150,7 +150,7 @@
                 self.builder.addIns(ins)
                 return tmp
              else:
-                print('Unknown {0}'.format(expr))
+                raise NotImplementedError('Unknown {0}'.format(expr))
                 tmp = self.builder.newTmp()
                 # TODO
                 return tmp
@@ -162,7 +162,7 @@
                 return tmp
                 #self.builder.addIns(ins)
             else:
-                raise Exception('Unknown {0}'.format(expr))
+                raise NotImplementedError('Unknown {0}'.format(expr))
         elif type(expr) is astnodes.Constant:
             tmp = self.builder.newTmp()
             # TODO
@@ -204,7 +204,7 @@
                 else:
                     raise Exception()
             else:
-                raise Exception("not implemented")
+                raise NotImplementedError("not implemented")
         elif type(expr) is astnodes.FunctionCall:
              tmp = self.builder.newTmp("res")
              args = []
@@ -216,5 +216,5 @@
              self.builder.addIns(ins)
              return tmp
         else:
-             raise CompilerError('Unknown expr {}'.format(expr))
+             raise NotImplementedError('Unknown expr {}'.format(expr))