parseCustomEncodingWith method

TreeSitterTree parseCustomEncodingWith(
  1. TreeSitterByteInputCallback read,
  2. TreeSitterCustomDecoder decode, {
  3. TreeSitterTree? oldTree,
  4. Iterable<TreeSitterInputEdit> edits = const [],
  5. 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,
)!;