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

Function preParsedSource

src/extraction/kernel/index.ts:138–141  ·  view source on GitHub ↗

* The preParse hoist (checklist §arch-1): languages with an offset-preserving * `preParse` hook (c/cpp macro blanking, csharp #237, metal #1121, cuda #1172) * apply it HERE, before the kernel call, so both arms parse identical blanked * bytes and none of the blanking logic needs a Rust port. The

(filePath: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

136 * blanks (`.metal` attributes; `.cu`/`.cuh` + content-gated CUDA).
137 */
138function preParsedSource(filePath: string, source: string, language: Language): string {
139 const pre = EXTRACTORS[language]?.preParse;
140 return pre ? pre(source, filePath) : source;
141}
142
143function isRouted(language: Language): boolean {
144 const env = process.env.CODEGRAPH_KERNEL_LANGS;

Callers 2

tryKernelExtractRawFunction · 0.85
tryKernelExtractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected