MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resolve_as_class

Function resolve_as_class

src/pipeline/pass_parallel.c:606–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604}
605
606static const char *resolve_as_class(const cbm_registry_t *reg, const char *name,
607 const char *module_qn, const char **imp_keys,
608 const char **imp_vals, int imp_count, CBMLanguage lang) {
609 cbm_resolution_t res =
610 cbm_registry_resolve_lang(reg, name, module_qn, imp_keys, imp_vals, imp_count, lang);
611 if (!res.qualified_name || res.qualified_name[0] == '\0') {
612 return NULL;
613 }
614 /* Accept any type-like container (Class/Struct/Interface/Enum/Type/Trait):
615 * base classes, Rust `impl Trait for S` struct receivers, and Go struct
616 * embedding all resolve through here. Struct included so the struct receiver
617 * of an IMPLEMENTS edge is not dropped. */
618 const char *label = cbm_registry_label_of(reg, res.qualified_name);
619 if (!cbm_label_is_type_like(label)) {
620 return NULL;
621 }
622 return res.qualified_name;
623}
624
625static void extract_decorator_func(const char *dec, char *out, size_t outsz) {
626 out[0] = '\0';

Callers 2

resolve_def_inheritsFunction · 0.70
resolve_file_semanticFunction · 0.70

Calls 3

cbm_registry_label_ofFunction · 0.85
cbm_label_is_type_likeFunction · 0.85

Tested by

no test coverage detected