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

Function spawn_entry_matches

internal/cbm/spawn_patterns.c:467–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467static bool spawn_entry_matches(const cbm_spawn_api_t *e, const char *callee, const char *expanded,
468 const CBMImport *imports, int count) {
469 switch (e->rule) {
470 case CBM_SPAWN_QUALIFIED:
471 return strcmp(callee, e->api) == 0 || (expanded[0] && strcmp(expanded, e->api) == 0);
472 case CBM_SPAWN_BARE:
473 return strcmp(callee, e->api) == 0;
474 case CBM_SPAWN_BARE_IMPORTED:
475 return strcmp(callee, e->api) == 0 && spawn_imports_module(imports, count, e->module);
476 case CBM_SPAWN_STRING_RECEIVER:
477 return spawn_string_receiver(callee, e->api);
478 default:
479 return false;
480 }
481}
482
483const cbm_spawn_api_t *cbm_spawn_match(CBMLanguage lang, const char *callee,
484 const CBMImport *imports, int count) {

Callers 1

cbm_spawn_matchFunction · 0.85

Calls 2

spawn_imports_moduleFunction · 0.85
spawn_string_receiverFunction · 0.85

Tested by

no test coverage detected