Fix invalid usage of 'extra' field on non-shift parse action
This commit is contained in:
parent
d9094e8146
commit
adf47e2b57
1 changed files with 1 additions and 2 deletions
|
|
@ -797,11 +797,10 @@ static void parser__do_potential_reductions(Parser *self, StackVersion starting_
|
|||
ts_language_table_entry(self->language, state, symbol, &entry);
|
||||
for (uint32_t i = 0; i < entry.action_count; i++) {
|
||||
TSParseAction action = entry.actions[i];
|
||||
if (action.params.extra) continue;
|
||||
switch (action.type) {
|
||||
case TSParseActionTypeShift:
|
||||
case TSParseActionTypeRecover:
|
||||
has_shift_action = true;
|
||||
if (!action.params.extra) has_shift_action = true;
|
||||
break;
|
||||
case TSParseActionTypeReduce:
|
||||
if (action.params.child_count > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue