diff --git a/lib/src/query.c b/lib/src/query.c index e5676e0f..bdc3b0e4 100644 --- a/lib/src/query.c +++ b/lib/src/query.c @@ -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 == '.') {