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

Function extract

__tests__/cpp-specialization-names.test.ts:104–114  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', source: string)

Source from the content-addressed store, hash-verified

102 });
103
104 function extract(backend: 'kernel' | 'wasm', source: string): ExtractionResult {
105 if (backend === 'wasm') {
106 process.env.CODEGRAPH_KERNEL = '0';
107 return extractFromSource('src/wire.h', source, 'cpp');
108 }
109 delete process.env.CODEGRAPH_KERNEL;
110 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
111 const result = tryKernelExtract('src/wire.h', source, 'cpp');
112 expect(result, 'kernel extraction of src/wire.h').not.toBeNull();
113 return result!;
114 }
115
116 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
117

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected