NAME

Text::Treesitter::QueryMatch - stores the result of a tree-sitter query pattern match

SYNOPSIS

TODO

DESCRIPTION

Instances of this class are returned from a Text::Treesitter::QueryCursor to iterate the matches of the most recent query operation.

METHODS

pattern_index

$index = $match->pattern_index;

Returns the index within the query indicating which pattern was responsible for this match.

capture_count

$count = $match->capture_count;

Returns the number of captures made by this pattern.

captures

@captures = $match->captures;

Returns a list of Capture instances, in pattern order. Each will be an instance of a class having the following accessors:

$capture->node
$capture->capture_id

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>