fix: bug with first child group anchor (anchor had no effect)

This commit is contained in:
Philipp Mildenberger 2023-03-01 03:05:53 +01:00 committed by Andrew Hlynskyi
parent da269ac350
commit 55a8db10cc

View file

@ -2260,7 +2260,7 @@ static TSQueryError ts_query__parse_pattern(
// If this parenthesis is followed by a node, then it represents a grouped sequence.
if (stream->next == '(' || stream->next == '"' || stream->next == '[') {
bool child_is_immediate = false;
bool child_is_immediate = is_immediate;
CaptureQuantifiers child_capture_quantifiers = capture_quantifiers_new();
for (;;) {
if (stream->next == '.') {