Fix bug where patterns with top-level alternatives were not considered 'rooted'

This commit is contained in:
Max Brunsfeld 2022-07-07 17:25:49 -07:00
parent 1401767689
commit 548c12fb88
5 changed files with 169 additions and 22 deletions

View file

@ -733,6 +733,11 @@ const TSQueryPredicateStep *ts_query_predicates_for_pattern(
uint32_t *length
);
bool ts_query_is_pattern_rooted(
const TSQuery *self,
uint32_t pattern_index
);
bool ts_query_is_pattern_guaranteed_at_step(
const TSQuery *self,
uint32_t byte_offset