File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2404,14 +2404,13 @@ static TSQueryError ts_query__parse_pattern(
24042404 length
24052405 );
24062406
2407+ // Add the capture quantifier
2408+ capture_quantifiers_add_for_id (capture_quantifiers , capture_id , TSQuantifierOne );
2409+
24072410 uint32_t step_index = starting_step_index ;
24082411 for (;;) {
24092412 QueryStep * step = & self -> steps .contents [step_index ];
24102413 query_step__add_capture (step , capture_id );
2411- // Add only once, not for every branch, lest the quantifier will be '+' instead of '1'
2412- if (step_index == starting_step_index ) {
2413- capture_quantifiers_add_for_id (capture_quantifiers , capture_id , TSQuantifierOne );
2414- }
24152414 if (
24162415 step -> alternative_index != NONE &&
24172416 step -> alternative_index > step_index &&
You can’t perform that action at this time.
0 commit comments