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

Function level_using

src/pipeline/doc_links_cs.c:4493–4504  ·  view source on GitHub ↗

The original resolver is shared by the full scan and candidate path. */

Source from the content-addressed store, hash-verified

4491
4492/* The original resolver is shared by the full scan and candidate path. */
4493static void level_using(const cs_ctx_t *c, const cs_using_t *u, const cs_query_t *q,
4494 bool a_type_name, cs_found_t *fd) {
4495 cs_work(SKIP_ONE);
4496 if (u->kind == 'n' && u->ns >= 0 && a_type_name) {
4497 /* a using brings a namespace's types, not the namespaces in it */
4498 add_types(c, true, u->ns, q->name, type_arity(q->arity), fd);
4499 } else if (u->kind == 's' && u->ent >= 0) {
4500 cs_query_t statics = *q;
4501 statics.statics = true;
4502 level_entity(c, u->ent, &statics, fd);
4503 }
4504}
4505
4506static size_t name_scope_range(const cs_index_t *ix, const char *name, size_t *end) {
4507 size_t lo = 0;

Callers 2

using_visitFunction · 0.85
unit_usingsFunction · 0.85

Calls 4

cs_workFunction · 0.85
add_typesFunction · 0.85
type_arityFunction · 0.85
level_entityFunction · 0.85

Tested by

no test coverage detected