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

Function ti_build_macros

src/mcp/test_impact_source.c:859–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857}
858
859static bool ti_build_macros(cbm_ti_source_t *s) {
860 for (int f = 0; f < s->file_count; f++) {
861 if (!s->files[f].header) {
862 continue;
863 }
864 for (int line = 1; line <= s->files[f].line_count; line++) {
865 size_t len = 0;
866 const char *text = cbm_ti_source_line(s, f, line, &len);
867 cbm_ti_span_t name;
868 size_t body = 0;
869 if (cbm_ti_match_define(text, len, &name, &body) &&
870 !ti_read_macro(s, f, &line, name, body)) {
871 return false;
872 }
873 }
874 }
875 return true;
876}
877
878const cbm_ti_macro_t *cbm_ti_source_macros(const cbm_ti_source_t *s, int *count) {
879 if (count) {

Callers 1

cbm_ti_source_finishFunction · 0.85

Calls 3

cbm_ti_source_lineFunction · 0.85
cbm_ti_match_defineFunction · 0.85
ti_read_macroFunction · 0.85

Tested by

no test coverage detected