Class Query.Match
A match of a Query.
Analogous to TSQueryMatch
.
Methods
Match:pattern_index () | Get the pattern index of the match. |
Match:capture_count () | Get the number of QueryCapture s in the match. |
Match:capture_at (index) | Get the QueryCapture at a given index. |
Match:query () | Get the Query to which the match belongs. |
Methods
- Match:pattern_index ()
-
Get the pattern index of the match.
Returns:
-
integer
- Match:capture_count ()
-
Get the number of
QueryCapture
s in the match.Returns:
-
integer
- Match:capture_at (index)
-
Get the
QueryCapture
at a given index.Parameters:
- index integer
Returns:
Raises:
Indexing a negative index.
Indexing beyond last element. - Match:query ()
-
Get the Query to which the match belongs.
Returns: