matchesWithOptions method

List<TreeSitterQueryMatch> matchesWithOptions(
  1. TreeSitterQuery query,
  2. TreeSitterNode node,
  3. TreeSitterQueryCursorOptions options, {
  4. String? source,
  5. TreeSitterQueryTextProvider? textProvider,
})

Implementation

List<TreeSitterQueryMatch> matchesWithOptions(
  TreeSitterQuery query,
  TreeSitterNode node,
  TreeSitterQueryCursorOptions options, {
  String? source,
  TreeSitterQueryTextProvider? textProvider,
}) {
  _checkNotDisposed();
  _requireSourceForPointRange(source);
  final execution = _lastExecution = _TreeSitterQueryExecution(
    _matchLimit,
    timeoutMicros: _timeoutMicros,
    progressCallback: options.progressCallback,
  );
  return query
      ._evaluate(
        node,
        source: source,
        textProvider: textProvider,
        queryRange: _range,
        maxStartDepth: _maxStartDepth,
        includeMatchPatterns: true,
        collectCaptures: false,
        execution: execution,
      )
      .matches;
}