diff python/c3/parser.py @ 152:b73bc14a3aa3

Light coupling ide and c3 frontend
author Windel Bouwman
date Sat, 02 Mar 2013 09:56:12 +0100
parents 4ae0e02599de
children b28a11c01dbe
line wrap: on
line diff
--- a/python/c3/parser.py	Fri Mar 01 17:13:56 2013 +0100
+++ b/python/c3/parser.py	Sat Mar 02 09:56:12 2013 +0100
@@ -1,5 +1,5 @@
 from . import astnodes, lexer, semantics
-from ppci.errors import CompilerException, SourceLocation
+from ppci import CompilerError
 
 # binop precedence for expressions:
 binopPrecs = {'or': 5, 'and': 10, \
@@ -15,10 +15,10 @@
       self.initLex(source)
       try:
          self.parsePackage()
-      except CompilerException as e:
-         self.diag.diag(e)
+      except CompilerError as e:
+         self.diag.addDiag(e)
    def Error(self, msg):
-      raise CompilerException(msg, self.token.loc)
+      raise CompilerError(msg, self.token.loc)
    # Lexer helpers:
    def Consume(self, typ):
       if self.Peak == typ: