Mark direct parents of errors as fragile

This commit is contained in:
Max Brunsfeld 2015-12-06 20:31:10 -08:00
parent 98f190d3ba
commit 4d48a2b1b5

View file

@ -79,6 +79,10 @@ void ts_tree_set_children(TSTree *self, size_t child_count, TSTree **children) {
self->visible_child_count += child->visible_child_count;
self->named_child_count += child->named_child_count;
}
if (child->symbol == ts_builtin_sym_error) {
self->options.fragile_left = self->options.fragile_right = true;
}
}
if (child_count > 0) {