TreeSitterWasmError.fromNative constructor
TreeSitterWasmError.fromNative()
Implementation
factory TreeSitterWasmError.fromNative(TreeSitterNativeWasmError error) =>
TreeSitterWasmError(switch (error.kind) {
TreeSitterNativeWasmErrorKind.parse => TreeSitterWasmErrorKind.parse,
TreeSitterNativeWasmErrorKind.compile =>
TreeSitterWasmErrorKind.compile,
TreeSitterNativeWasmErrorKind.instantiate =>
TreeSitterWasmErrorKind.instantiate,
TreeSitterNativeWasmErrorKind.none ||
TreeSitterNativeWasmErrorKind.allocate => TreeSitterWasmErrorKind.other,
}, error.message);