MCPcopy
hub / github.com/opentrace/opentrace / initTreeSitter

Function initTreeSitter

ui/src/components/pipeline/__tests__/helpers.ts:24–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22let initialized = false;
23
24export async function initTreeSitter(): Promise<void> {
25 if (initialized) return;
26 const runtimePath = getWasmPath('runtime');
27 const wasmBuf = await readFile(runtimePath);
28 await Parser.init({
29 locateFile: () => runtimePath,
30 wasmBinary: wasmBuf,
31 });
32 initialized = true;
33}
34
35let pyParser: Parser | null = null;
36

Callers 2

getPythonParserFunction · 0.85
getPhpParserFunction · 0.85

Calls 3

getWasmPathFunction · 0.90
readFileFunction · 0.85
initMethod · 0.65

Tested by

no test coverage detected