lang_registry.h (747B)
1 #ifndef KIT_INTERNAL_API_LANG_REGISTRY_H 2 #define KIT_INTERNAL_API_LANG_REGISTRY_H 3 4 #include <kit/compile.h> 5 #include <kit/core.h> 6 7 /* Wire every KIT_LANG_*_ENABLED frontend into c->frontends[]. Called 8 * once during compiler construction; see src/api/lang_registry.c. */ 9 void lang_registry_init(KitCompiler* c); 10 11 /* Return the compile-time default frontend vtable for `lang` (the same 12 * KIT_LANG_*_ENABLED set lang_registry_init wires), or NULL for an 13 * unregistered or out-of-range language. This lets the public language 14 * resolvers answer without a KitCompiler instance (e.g. at CLI arg-parse 15 * time). It does not see per-compiler kit_register_frontend overrides. */ 16 const KitFrontendVTable* lang_registry_vtable(KitLanguage lang); 17 18 #endif