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

Function impl_node

src/pipeline/doc_links_cs.c:3850–3868  ·  view source on GitHub ↗

The implementation's node among one entity's own declarations. What is an * alternative is not chosen between: * - complete declarations of the type in two or more projects (the * flavours of one assembly's type): the one of the referencing file's own * project is meant -- and when that one has no node, no other flavour's * stands in for it; * - parts in two or more shared tr

Source from the content-addressed store, hash-verified

3848 * From anywhere else the type is AMBIGUOUS (*why). GAP when no
3849 * implementation in view has a node. */
3850static cs_pick_t impl_node(const cs_ctx_t *c, const cs_entity_t *e, const cbm_gbuf_node_t **node,
3851 cs_why_t *why) {
3852 if ((c->prod ? e->full_units_prod : e->full_units) >= PAIR_LEN) {
3853 bool too_many = false;
3854 const cs_full_t *own = own_full(c, e, &too_many);
3855 if (!own) {
3856 *why = too_many ? CS_WHY_LIMIT : CS_WHY_FLAVOURS;
3857 return CS_PICK_AMBIGUOUS;
3858 }
3859 *node = c->ix->files[own->file].types[own->type].node;
3860 return *node ? CS_PICK_NODE : CS_PICK_GAP;
3861 }
3862 if (e->shared_parts && e->nunits >= PAIR_LEN && !ent_in_unit(e, c->unit)) {
3863 *why = CS_WHY_SHARED;
3864 return CS_PICK_AMBIGUOUS;
3865 }
3866 *node = class_node(c, e, false);
3867 return *node ? CS_PICK_NODE : CS_PICK_GAP;
3868}
3869
3870/* The type's node for a reference from this context: an implementation's --
3871 * of the type's own declarations, then of the shared trees' declaration that

Callers 1

type_resultFunction · 0.85

Calls 3

own_fullFunction · 0.85
ent_in_unitFunction · 0.85
class_nodeFunction · 0.85

Tested by

no test coverage detected