From d7f09c297442811b81eb03a2d52b1989ab08791a Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 8 Jan 2025 10:24:50 -0500 Subject: [PATCH] fix(query): ensure `capture_id` is set for any-of predicates --- tree_sitter/binding/query.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tree_sitter/binding/query.c b/tree_sitter/binding/query.c index c0f27c2..1050859 100644 --- a/tree_sitter/binding/query.c +++ b/tree_sitter/binding/query.c @@ -351,6 +351,7 @@ PyObject *query_new(PyTypeObject *cls, PyObject *args, PyObject *Py_UNUSED(kwarg QueryPredicateAnyOf *predicate = PyObject_New(QueryPredicateAnyOf, state->query_predicate_anyof_type); + predicate->capture_id = (predicate_step + 1)->value_id; predicate->is_positive = is_positive; predicate->values = values; PyObject *predicate_obj =