ReadonlymatchThe maximum number of in-progress matches for this cursor.
Iterate over all of the individual captures in the order that they appear.
This is useful if you don't care about which pattern matched, and just want a single, ordered sequence of captures.
The syntax node to query
Optionaloptions: QueryOptionsOptional query options
An array of captures
Check if, on its last execution, this cursor exceeded its maximum number of in-progress matches.
true if the cursor exceeded its match limit
Disable a certain capture within a query.
This prevents the capture from being returned in matches, and also avoids any resource usage associated with recording the capture.
The name of the capture to disable
Disable a certain pattern within a query.
This prevents the pattern from matching, and also avoids any resource usage associated with the pattern.
The index of the pattern to disable
Get the byte offset where the given pattern ends in the query's source.
The index of the pattern to check
The byte offset where the pattern ends
Check if a given step in a query is 'definite'.
A query step is 'definite' if its parent pattern will be guaranteed to match successfully once it reaches the step.
The byte offset of the step to check
Check if a given pattern within a query has a single root node.
The index of the pattern to check
Check if a given pattern within a query has a single root node.
The index of the pattern to check
Iterate over all of the matches in the order that they were found.
Each match contains the index of the pattern that matched, and a list of captures. Because multiple patterns can match the same set of nodes, one match may contain captures that appear before some of the captures from a previous match.
The syntax node to query
Optionaloptions: QueryOptionsOptional query options
An array of matches
Get the byte offset where the given pattern starts in the query's source.
The index of the pattern to check
The byte offset where the pattern starts
Create a new query from a string containing one or more S-expression patterns.
The query is associated with a particular language, and can only be run on syntax nodes parsed with that language. References to Queries can be shared between multiple threads.