Revision 752
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/Parser.py | ||
---|---|---|
31 | 31 |
else: return None |
32 | 32 |
|
33 | 33 |
def _syntax_err(self, token): |
34 |
after = self._str[self._pos:] |
|
35 |
if after == '': after += '<END>' |
|
34 | 36 |
raise SyntaxException(self.__class__.__name__+' syntax error: '+token |
35 |
+' expected in '+term.as_style('90', self._str[:self._pos]) |
|
36 |
+self._str[self._pos:]+'<END>') |
|
37 |
+' expected in '+ term.as_style('90', self._str[:self._pos]) +after) |
Also available in: Unified diff
Parser.py: In syntax errors, only print <END> at end of string if error was at end of string