Don't include reduce actions for nonterminal lookaheads

This commit is contained in:
Max Brunsfeld 2016-11-10 10:25:32 -08:00
parent c9dcb29c6f
commit 8d9c261e3a
9 changed files with 158 additions and 110 deletions

View file

@ -1086,7 +1086,7 @@ static void parser__advance(Parser *self, StackVersion version,
return;
}
parser__handle_error(self, version, lookahead->symbol);
parser__handle_error(self, version, lookahead->first_leaf.symbol);
if (ts_stack_is_halted(self->stack, version)) {
ts_tree_release(lookahead);