( lang: NativeLang, kind: NativeKind, r: NativeAstResolved )
| 230 | * diagnostic (deduped per lang+kind). Call once per sub-detector, not per file. |
| 231 | */ |
| 232 | export function nativePluginFor( |
| 233 | lang: NativeLang, |
| 234 | kind: NativeKind, |
| 235 | r: NativeAstResolved |
| 236 | ): NativePlugin | null { |
| 237 | if (!nativeEnabledFor(r, lang)) return null; |
| 238 | |
| 239 | const plugin = getNativePlugin(lang, r); |
| 240 | if (!plugin || typeof plugin[kind] !== "function") { |
| 241 | if (r.mode === "strict") recordUnavailable(r, lang, kind); |
| 242 | return null; |
| 243 | } |
| 244 | return plugin; |
| 245 | } |
| 246 | |
| 247 | /** Record a per-file parse failure (strict mode). */ |
| 248 | export function recordParseError( |
nothing calls this directly
no test coverage detected