captureQuantifierForId method

TreeSitterCaptureQuantifier captureQuantifierForId(
  1. int patternIndex,
  2. int captureId
)

Implementation

TreeSitterCaptureQuantifier captureQuantifierForId(
  int patternIndex,
  int captureId,
) {
  _checkNotDisposed();
  _checkPatternIndex(patternIndex);
  if (captureId < 0) {
    throw RangeError.index(captureId, _nativeCaptureNames, 'captureId');
  }
  if (captureId >= _nativeCaptureNames.length) {
    return TreeSitterCaptureQuantifier.zero;
  }
  return captureQuantifiers(patternIndex)[_nativeCaptureNames[captureId]] ??
      TreeSitterCaptureQuantifier.zero;
}