TreeSitterQueryMatch class final

One complete Tree-sitter query match, retaining all capture bindings and pattern-level #set! metadata.

Highlight rendering normally consumes the flattened TreeSitterQuery.captures view. Language injection needs the match boundary so that a captured language marker is paired with the correct injection.content node.

Constructors

TreeSitterQueryMatch({required List<TreeSitterQueryCapture> captures, int id = 0, int patternIndex = 0, Map<String, String?> setProperties = const {}, int priority = 0, int completionByte = -1, int startDepth = 0})
const

Properties

captures List<TreeSitterQueryCapture>
final
completionByte int
Byte position at which the final structural step of this match became definite. Query result ordering uses this rather than the final capture, because required steps do not need to be captured.
final
debugString String
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
final
isRemoved bool
no setter
patternIndex int
final
priority int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setProperties Map<String, String?>
final

Methods

nodesForCaptureIndex(int captureIndex) Iterable<TreeSitterNode>
Returns every node bound to one numeric capture id, in match order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Removes this match from its active capture stream. Captures already returned remain returned; later captures sharing this handle are skipped.
satisfiesTextPredicates(TreeSitterQuery query, {String? source, TreeSitterQueryTextProvider? textProvider}) bool
Applies only Tree-sitter's built-in text predicates to this match.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited