mirror of https://github.com/lark-parser/lark.git
Tiny fix in lexer
This commit is contained in:
parent
40d732ddf5
commit
88242f10d7
|
@ -159,10 +159,10 @@ class Lexer(object):
|
|||
|
||||
if to_yield:
|
||||
t = Token(type_, value, lex_pos, line, lex_pos - col_start_pos)
|
||||
end_col = t.column + len(value)
|
||||
if t.type in self.callback:
|
||||
t = self.callback[t.type](t)
|
||||
|
||||
end_col = t.column + len(value)
|
||||
if type_ in newline_types:
|
||||
newlines = value.count(self.newline_char)
|
||||
if newlines:
|
||||
|
|
Loading…
Reference in New Issue