firstNamedChildForByte method

TreeSitterNode? firstNamedChildForByte(
  1. int byteOffset
)

Implementation

TreeSitterNode? firstNamedChildForByte(int byteOffset) {
  if (byteOffset < 0) throw RangeError.value(byteOffset, 'byteOffset');
  for (var index = 0; index < children.length; index++) {
    final candidate = _bindChild(index);
    if (candidate.isNamed && candidate.endByte > byteOffset) return candidate;
  }
  return null;
}