MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / extract

Function extract

__tests__/cpp-declarator-clause-names.test.ts:64–74  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

62 });
63
64 function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult {
65 if (backend === 'wasm') {
66 process.env.CODEGRAPH_KERNEL = '0';
67 return extractFromSource(file, source, language);
68 }
69 delete process.env.CODEGRAPH_KERNEL;
70 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
71 const result = tryKernelExtract(file, source, language);
72 expect(result, `kernel extraction of ${file}`).not.toBeNull();
73 return result!;
74 }
75
76 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
77

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected