Proper positions for synthetic tokens
This commit is contained in:
parent
0c3e6b211c
commit
a3786c62ba
1 changed files with 2 additions and 1 deletions
|
|
@ -400,8 +400,9 @@ class Parser:
|
|||
# Insert a token into the stream.
|
||||
# Need to advance the cursor to compensate.
|
||||
assert repair.value is not None
|
||||
pos = input[cursor].end
|
||||
input.insert(
|
||||
cursor, TokenValue(kind=repair.value, start=-1, end=-1)
|
||||
cursor, TokenValue(kind=repair.value, start=pos, end=pos)
|
||||
)
|
||||
cursor += 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue