Handle multiple top-level alternations correctly
This commit is contained in:
parent
8b28f3a8c4
commit
ec9b00e5c6
2 changed files with 19 additions and 1 deletions
|
|
@ -1990,7 +1990,7 @@ static TSQueryError ts_query__parse_pattern(
|
|||
return e;
|
||||
}
|
||||
|
||||
if(start_index == 0) {
|
||||
if(start_index == starting_step_index) {
|
||||
capture_quantifiers_replace(capture_quantifiers, &branch_capture_quantifiers);
|
||||
} else {
|
||||
capture_quantifiers_join_all(capture_quantifiers, &branch_capture_quantifiers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue