Fix bug when stack versions merge after reducing a non-terminal extra
This commit is contained in:
parent
be463c7789
commit
ca902065cb
1 changed files with 7 additions and 0 deletions
|
|
@ -1539,6 +1539,13 @@ static bool ts_parser__advance(
|
|||
continue;
|
||||
}
|
||||
|
||||
// A non-terminal extra rule was reduced and merged into an existing
|
||||
// stack version. This version can be discarded.
|
||||
if (!lookahead.ptr) {
|
||||
ts_stack_halt(self->stack, version);
|
||||
return true;
|
||||
}
|
||||
|
||||
// If there were no parse actions for the current lookahead token, then
|
||||
// it is not valid in this state. If the current lookahead token is a
|
||||
// keyword, then switch to treating it as the normal word token if that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue