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 QueryCaptures 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 QueryCaptures in the match.

Returns:

    integer
Match:capture_at (index)
Get the QueryCapture at a given index.

Parameters:

  • index integer

Returns:

    Capture

Raises:

Indexing a negative index.
Indexing beyond last element.
Match:query ()
Get the Query to which the match belongs.

Returns:

    Query
generated by LDoc 1.5.0 Last updated 2024-04-16 14:22:44