Skip to content

Commit

Permalink
fix(query): ensure capture_id is set for any-of predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jan 8, 2025
1 parent a85342e commit d7f09c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tree_sitter/binding/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit d7f09c2

Please sign in to comment.