treeSitterTextProviderForByteSlice function
Creates Rust's TextProvider for &[u8] counterpart.
Each call yields exactly one borrowed view of the node's half-open byte
range. Mutations to bytes remain visible through an already-yielded view.
Implementation
TreeSitterQueryTextProvider treeSitterTextProviderForByteSlice(
Uint8List bytes,
) => (node) sync* {
yield Uint8List.sublistView(bytes, node.startByte, node.endByte);
};