Browse Source

Fix propogate positions for Earley

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.6.6
night199uk 6 years ago
parent
commit
ea536820a5
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lark/parsers/xearley.py

+ 3
- 0
lark/parsers/xearley.py View File

@@ -282,6 +282,9 @@ class Parser:
# completer/predictor) or the to_scan buffer for the next parse step.
for item, start, token in delayed_matches[i+1]:
if token is not None:
token.end_line = text_line
token.end_column = text_column + 1

new_item = item.advance()
label = (new_item.s, new_item.start, i)
new_item.node = node_cache[label] if label in node_cache else node_cache.setdefault(label, SymbolNode(*label))


Loading…
Cancel
Save