* 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)
| 136 | * blanks (`.metal` attributes; `.cu`/`.cuh` + content-gated CUDA). |
| 137 | */ |
| 138 | function preParsedSource(filePath: string, source: string, language: Language): string { |
| 139 | const pre = EXTRACTORS[language]?.preParse; |
| 140 | return pre ? pre(source, filePath) : source; |
| 141 | } |
| 142 | |
| 143 | function isRouted(language: Language): boolean { |
| 144 | const env = process.env.CODEGRAPH_KERNEL_LANGS; |
no outgoing calls
no test coverage detected