QueryPredicate#
- class tree_sitter.QueryPredicate#
Bases:
ProtocolA custom query predicate that runs on a pattern.
Special Methods#
- __call__(predicate, args, pattern_index, captures)#
- Parameters:
- Returns:
Trueif the predicate matches,Falseotherwise.
Tip
You don’t need to create an actual class, just a function with this signature.