Browse Source

Copy exc state when converting UnexpectedCharacters to UnexpectedToken exc. Fixes #462

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.7.8
Timo Furrer 4 years ago
parent
commit
9f218f85b6
No known key found for this signature in database GPG Key ID: 96704219D3304F22
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lark/lexer.py

+ 1
- 1
lark/lexer.py View File

@@ -384,6 +384,6 @@ class ContextualLexer(Lexer):

value, type_ = root_match
t = Token(type_, value, e.pos_in_stream, e.line, e.column)
raise UnexpectedToken(t, e.allowed)
raise UnexpectedToken(t, e.allowed, state=e.state)

###}

Loading…
Cancel
Save