From 88242f10d7b2e8416681238c563f96e5fa1c7fea Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Sun, 28 May 2017 16:09:41 +0300 Subject: [PATCH] Tiny fix in lexer --- lark/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lark/lexer.py b/lark/lexer.py index 63e306f..86d976f 100644 --- a/lark/lexer.py +++ b/lark/lexer.py @@ -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: