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