treeSitterDecode function

TreeSitterDecodeResult treeSitterDecode(
  1. TreeSitterCustomDecoder decoder,
  2. List<int> bytes
)

Invokes a custom decoder with the borrowed input slice unchanged.

This is the method-shaped counterpart of Rust's static Decode::decode contract. Validation of the returned scalar and byte count belongs to the input consumer, not to the decoder trait itself.

Implementation

TreeSitterDecodeResult treeSitterDecode(
  TreeSitterCustomDecoder decoder,
  List<int> bytes,
) => decoder(bytes);