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

Function extract

__tests__/csharp-null-conditional-calls.test.ts:83–93  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', source: string)

Source from the content-addressed store, hash-verified

81 });
82
83 function extract(backend: 'kernel' | 'wasm', source: string): ExtractionResult {
84 if (backend === 'wasm') {
85 process.env.CODEGRAPH_KERNEL = '0';
86 return extractFromSource('Consumer.cs', source, 'csharp');
87 }
88 delete process.env.CODEGRAPH_KERNEL;
89 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
90 const result = tryKernelExtract('Consumer.cs', source, 'csharp');
91 expect(result, 'kernel extraction').not.toBeNull();
92 return result!;
93 }
94
95 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
96

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected