Skip to content
Myr

[svn] fixed a lexer error reporting issue

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 63ca721 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:jinja/lexer.py+3 added-3 removed
71 unmodified lines
72 def __init__(self, message, cls=TemplateSyntaxError):73 self.message = message74 self.error_class = cls7576 def __call__(self, lineno):77 raise self.error_class(self.message, lineno)76 def __call__(self, lineno, filename):77 raise self.error_class(self.message, lineno, filename)787980class LexerMeta(type):81 """
193 unmodified lines
275 lineno += g.count('\n')276 continue277 # failure group278 elif isinstance(token, Failure):279 raise token(m.start(idx + 1))279 raise token(lineno, filename)280 # bygroup is a bit more complex, in that case we281 # yield for the current token the first named282 # group that matched283 elif token == '#bygroup':
90 unmodified lines