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

Function has_magma_callable_pattern

src/discover/language.c:1310–1326  ·  view source on GitHub ↗

Check for "intrinsic Name(" or "procedure Name(" patterns. */

Source from the content-addressed store, hash-verified

1308
1309/* Check for "intrinsic Name(" or "procedure Name(" patterns. */
1310static bool has_magma_callable_pattern(const char *buf) {
1311 const char *markers[] = {"intrinsic ", "procedure "};
1312 for (int i = 0; i < LANG_SCAN_PASSES; i++) {
1313 const char *p = strstr(buf, markers[i]);
1314 if (!p) {
1315 continue;
1316 }
1317 p += strlen(markers[i]);
1318 while (*p && isalpha((unsigned char)*p)) {
1319 p++;
1320 }
1321 if (*p == '(') {
1322 return true;
1323 }
1324 }
1325 return false;
1326}
1327
1328/* Scan lines for MATLAB-specific markers (function/classdef/%%). */
1329static bool has_matlab_line_markers(const char *buf) {

Callers 1

lang_m_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected