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

Function parse_using

src/pipeline/doc_links_cs.c:1039–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1037}
1038
1039static bool parse_using(cs_file_t *f, char **fld, int n, int regions_seen) {
1040 /* U region kind alias target */
1041 if (n != 5) {
1042 return false;
1043 }
1044 int region = field_index(fld[1], regions_seen);
1045 char kind = fld[2][0];
1046 bool global = kind && fld[2][1] == 'g';
1047 if (region < 0 || !kind || !strchr("nsa", kind) || (fld[2][1] && !(global && !fld[2][2]))) {
1048 return false;
1049 }
1050 f->usings[f->nusings++] = (cs_using_t){.region = region,
1051 .kind = kind,
1052 .global = global,
1053 .alias = strcmp(fld[3], "-") == 0 ? "" : fld[3],
1054 .target = fld[4],
1055 .ns = CS_NONE,
1056 .ent = CS_NONE};
1057 return true;
1058}
1059
1060static bool parse_type(cs_file_t *f, char **fld, int n, int regions_seen) {
1061 /* T region start end kind outer name tparams bases */

Callers 1

parse_recordsFunction · 0.85

Calls 1

field_indexFunction · 0.85

Tested by

no test coverage detected