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

Function wasmExtract

__tests__/cpp-brace-scopes.test.ts:165–174  ·  view source on GitHub ↗
(file: string, source: string)

Source from the content-addressed store, hash-verified

163};
164
165function wasmExtract(file: string, source: string): ExtractionResult {
166 const saved = process.env.CODEGRAPH_KERNEL;
167 process.env.CODEGRAPH_KERNEL = '0';
168 try {
169 return extractFromSource(file, source, 'cpp');
170 } finally {
171 if (saved === undefined) delete process.env.CODEGRAPH_KERNEL;
172 else process.env.CODEGRAPH_KERNEL = saved;
173 }
174}
175
176const named = (result: ExtractionResult, kind: string): string[] =>
177 result.nodes.filter((n) => n.kind === kind).map((n) => n.qualifiedName);

Callers 1

Calls 1

extractFromSourceFunction · 0.90

Tested by

no test coverage detected