MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / nativePluginFor

Function nativePluginFor

src/ast/native-loader.ts:232–245  ·  view source on GitHub ↗
(
  lang: NativeLang,
  kind: NativeKind,
  r: NativeAstResolved
)

Source from the content-addressed store, hash-verified

230 * diagnostic (deduped per lang+kind). Call once per sub-detector, not per file.
231 */
232export 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). */
248export function recordParseError(

Callers

nothing calls this directly

Calls 3

nativeEnabledForFunction · 0.85
getNativePluginFunction · 0.85
recordUnavailableFunction · 0.85

Tested by

no test coverage detected