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

Function lang_m_text

src/discover/language.c:1352–1368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350}
1351
1352static CBMLanguage lang_m_text(const char *buf) {
1353 if (has_objc_markers(buf)) {
1354 return CBM_LANG_OBJC;
1355 }
1356 if (has_magma_end_markers(buf)) {
1357 return CBM_LANG_MAGMA;
1358 }
1359 if ((str_contains(buf, "intrinsic ") || str_contains(buf, "procedure ")) &&
1360 has_magma_callable_pattern(buf)) {
1361 return CBM_LANG_MAGMA;
1362 }
1363 if (has_matlab_line_markers(buf)) {
1364 return CBM_LANG_MATLAB;
1365 }
1366
1367 return CBM_LANG_MATLAB;
1368}
1369
1370CBMLanguage cbm_disambiguate_m(const char *path) {
1371 unsigned char head[LANG_PROBE_HEAD];

Callers 2

cbm_disambiguate_mFunction · 0.85

Calls 5

has_objc_markersFunction · 0.85
has_magma_end_markersFunction · 0.85
has_matlab_line_markersFunction · 0.85
str_containsFunction · 0.70

Tested by

no test coverage detected