Readonly
matchThe 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
Optional
options: QueryOptionsOptional query options
An array of captures
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
Optional
options: QueryOptionsOptional query options
An array of matches
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.