Commits

Andrey Lesnikov  committed 7233065

'assert False' -> 'raise Exception('Not implemented')

  • Participants
  • Parent commits 8a84247

Comments (0)

Files changed (2)

File generator.py

         elif isinstance(statement, table.FunctionCallStatement):
             out += self.generate_function_call_statement(function, statement)
         else:
-            assert False
+            raise Exception("Not Implemented")
         return out
 
     def generate_function(self, function):
         elif isinstance(expression, ast.NodeNumber):
             return self.parse_number(expression)
         else:
-            assert False
+            raise Exception("Not Implemented")
 
     def parse_variable_declaration_statement(self, function, statement):
         expression_id = self.parse_expression(statement.expression)
         elif isinstance(statement, ast.NodeIf):
             self.parse_if_statement(function, statement)
         else:
-            assert False  # TODO: ...
+            raise Exception("Not Implemented")
 
     def parse_function_declaration(self, declaration):
         function = Function(
             if isinstance(declaration, ast.NodeFunctionDeclaration):
                 self.parse_function_declaration(declaration)
             elif isinstance(declaration, ast.NodeTypeDeclaration):
-                assert False  # TODO
+                raise Exception("Not Implemented")
             else:
-                assert False
+                raise Exception("Not Implemented")
 
 # vim: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: