parseCustomEncodingWith method
TreeSitterTree
parseCustomEncodingWith(
- TreeSitterByteInputCallback read,
- TreeSitterCustomDecoder decode, {
- TreeSitterTree? oldTree,
- Iterable<
TreeSitterInputEdit> edits = const [], - bool annotateLocals = true,
Parses bytes through a caller-defined Tree-sitter 0.25 decoder.
Implementation
TreeSitterTree parseCustomEncodingWith(
TreeSitterByteInputCallback read,
TreeSitterCustomDecoder decode, {
TreeSitterTree? oldTree,
Iterable<TreeSitterInputEdit> edits = const [],
bool annotateLocals = true,
}) => parseNativeInput(
TreeSitterNativeInput(
encoding: TreeSitterInputEncoding.custom,
decode: decode,
read: (_, byteOffset, point) => read(byteOffset, point),
),
oldTree: oldTree,
edits: edits,
annotateLocals: annotateLocals,
)!;