Browse Source

Merge pull request #463 from timofurrer/bugfix/exc-state

Copy exc state when converting UnexpectedCharacters to UnexpectedToken exc. Fixes #462
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.7.8
Erez Shinan 5 years ago
committed by GitHub
parent
commit
0a2ff289d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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