Mercurial > lcfOS
diff python/c3/parser.py @ 169:ee0d30533dae
Added more tests and improved the diagnostic update
author | Windel Bouwman |
---|---|
date | Sat, 23 Mar 2013 18:34:41 +0100 |
parents | 0b5b2ee6b435 |
children | 46d62dadd61b |
line wrap: on
line diff
--- a/python/c3/parser.py Fri Mar 22 19:09:38 2013 +0100 +++ b/python/c3/parser.py Sat Mar 23 18:34:41 2013 +0100 @@ -13,6 +13,7 @@ self.diag = diag def parseSource(self, source): self.initLex(source) + self.sema.reinit() try: self.parsePackage() except CompilerError as e: @@ -210,13 +211,6 @@ # Parsing expressions: def parseExpression(self): return self.parseBinopRhs(self.parsePrimary(), 0) - # TODO: use this error handling: - try: - return self.parseBinopRhs(self.parsePrimary(), 0) - except CompilerError as e: - self.diag.addDiag(e) - self.skipToSemi(';') - return astnodes.Literal(0) def parsePrimary(self): if self.hasConsumed('('): e = self.parseExpression()