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

Function parse_scope

src/pipeline/doc_links_cs.c:1244–1267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1242}
1243
1244static bool parse_scope(cs_index_t *ix, cs_file_t *f, const char *blob) {
1245 char *buf = ix_strdup(ix, blob);
1246 if (!buf) {
1247 return false;
1248 }
1249 cs_counts_t n;
1250 count_records(buf, &n);
1251 f->nregions = n.regions;
1252 f->regions = (cs_region_t *)ix_zalloc(ix, (size_t)n.regions * sizeof(cs_region_t));
1253 f->usings = (cs_using_t *)ix_alloc(ix, (size_t)n.usings * sizeof(cs_using_t));
1254 f->types = (cs_type_t *)ix_alloc(ix, (size_t)n.types * sizeof(cs_type_t));
1255 f->members = (cs_member_t *)ix_alloc(ix, (size_t)n.members * sizeof(cs_member_t));
1256 f->unplaced = (cs_span_lines_t *)ix_alloc(ix, (size_t)n.unplaced * sizeof(cs_span_lines_t));
1257 f->tparams = (cs_tparam_t *)ix_alloc(ix, (size_t)n.tparams * sizeof(cs_tparam_t));
1258 if (ix->oom) {
1259 return false;
1260 }
1261 f->regions[0].parent = CS_NONE;
1262 if (!parse_records(ix, f, buf)) {
1263 return false;
1264 }
1265 finish_ranges(f);
1266 return finish_lookups(ix, f);
1267}
1268
1269/* ── Units (C# projects) and their global usings ─────────────────── */
1270

Callers 2

cs_scope_acceptedFunction · 0.85
build_filesFunction · 0.85

Calls 7

count_recordsFunction · 0.85
ix_zallocFunction · 0.85
parse_recordsFunction · 0.85
finish_rangesFunction · 0.85
finish_lookupsFunction · 0.85
ix_strdupFunction · 0.70
ix_allocFunction · 0.70

Tested by

no test coverage detected