Permalink
Browse files

Better error message

  • Loading branch information...
rspivak committed Apr 9, 2012
1 parent b1c5a51 commit bebdd26e62c193eae789374e246700e6c34b8b55
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/slimit/lexer.py
View
@@ -417,5 +417,6 @@ def t_ID(self, token):
return token
def t_error(self, token):
print 'Illegal character %r' % token.value[0]
print 'Illegal character %r at %s:%s after %s' % (
token.value[0], token.lineno, token.lexpos, self.prev_token)
token.lexer.skip(1)

0 comments on commit bebdd26

Please sign in to comment.