Revision 151
Added by Aaron Marcuse-Kubitza about 13 years ago
Parser.py | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import re |
4 | 4 |
|
5 |
import term |
|
6 |
|
|
5 | 7 |
class SyntaxException(Exception): pass |
6 | 8 |
|
7 | 9 |
class Parser: |
... | ... | |
30 | 32 |
|
31 | 33 |
def _syntax_err(self, token): |
32 | 34 |
raise SyntaxException(self.__class__.__name__+' syntax error: '+token |
33 |
+' expected in '+self._str[self._pos:]) |
|
35 |
+' expected in '+term.as_style('90', self._str[:self._pos]) |
|
36 |
+self._str[self._pos:]+'<END>') |
Also available in: Unified diff
Added faded beginning of string in Parser syntax errors