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

Function kernel

__tests__/ts-variance-annotations.test.ts:161–166  ·  view source on GitHub ↗
(file: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

159 return extractFromSource(file, source, language);
160 };
161 const kernel = (file: string, source: string, language: Language): ExtractionResult | null => {
162 delete process.env.CODEGRAPH_KERNEL;
163 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
164 // Null when the kernel defers the file to the wasm parser, as it does every file with a parse error.
165 return tryKernelExtract(file, source, language);
166 };
167 const canon = (r: ExtractionResult): string[] => [
168 ...r.nodes.map(({ updatedAt: _u, ...n }) => JSON.stringify(n, Object.keys(n).sort())).sort(),
169 ...r.unresolvedReferences.map((ref) => JSON.stringify(ref, Object.keys(ref).sort())).sort(),

Callers 1

Calls 1

tryKernelExtractFunction · 0.90

Tested by

no test coverage detected