Break down unverified reductions eagerly when the next node has changes
This commit is contained in:
parent
d713054d61
commit
4ca965019f
1 changed files with 4 additions and 0 deletions
|
|
@ -145,6 +145,10 @@ static TSTree *ts_parser__get_next_lookahead(TSParser *self, int head) {
|
|||
|
||||
bool can_reuse = true;
|
||||
if (ts_tree_has_changes(state->reusable_subtree)) {
|
||||
if (state->is_verifying) {
|
||||
ts_parser__breakdown_top_of_stack(self, head);
|
||||
state->is_verifying = false;
|
||||
}
|
||||
LOG("breakdown_changed sym:%s", SYM_NAME(state->reusable_subtree->symbol));
|
||||
can_reuse = false;
|
||||
} else if (ts_tree_is_fragile(state->reusable_subtree)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue