From 55a8db10ccff9099b52792f7c1e5095bcb6f934d Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Wed, 1 Mar 2023 03:05:53 +0100 Subject: [PATCH] fix: bug with first child group anchor (anchor had no effect) --- lib/src/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 == '.') {