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

Function level_entity

src/pipeline/doc_links_cs.c:4412–4434  ·  view source on GitHub ↗

The types nested in `ent` and the members it declares itself, by the * query. A doc ID's member kind names a member, never a nested type. */

Source from the content-addressed store, hash-verified

4410/* The types nested in `ent` and the members it declares itself, by the
4411 * query. A doc ID's member kind names a member, never a nested type. */
4412static void level_entity(const cs_ctx_t *c, int ent, const cs_query_t *q, cs_found_t *fd) {
4413 /* the shared trees' declaration seen without an assembly's own parts of
4414 * the type: a name those parts declare is not told from what is here */
4415 cs_why_t why = CS_WHY_PARTS;
4416 if (c->ix->ents[ent].used &&
4417 unseen_part_declares(c, ent, q->name, q->arity, q->types_only, &why)) {
4418 fd->n += PAIR_LEN;
4419 fd->why = why;
4420 return;
4421 }
4422 if (!q->kind) {
4423 add_types(c, false, ent, q->name, type_arity(q->arity), fd);
4424 }
4425 if (q->types_only) {
4426 return;
4427 }
4428 int has = members_named(c, ent, q);
4429 if (has == CS_HAS_VISIBLE) {
4430 found_add(fd, 'M', ent);
4431 } else if (has == CS_HAS_INVISIBLE) {
4432 fd->invisible = true;
4433 }
4434}
4435
4436/* What an alias was resolved to, as a candidate. */
4437static void add_alias_target(const cs_ctx_t *c, const cs_using_t *u, cs_found_t *fd) {

Callers 4

level_usingFunction · 0.85
lookupFunction · 0.85
inherited_resultFunction · 0.85
member_inFunction · 0.85

Calls 5

unseen_part_declaresFunction · 0.85
add_typesFunction · 0.85
type_arityFunction · 0.85
members_namedFunction · 0.85
found_addFunction · 0.85

Tested by

no test coverage detected