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

Function lookup_string_constant

internal/cbm/extract_calls.c:34–45  ·  view source on GitHub ↗

Look up a module-level string constant by name. */

Source from the content-addressed store, hash-verified

32
33/* Look up a module-level string constant by name. */
34static const char *lookup_string_constant(const CBMExtractCtx *ctx, const char *name) {
35 if (!name || !name[0]) {
36 return NULL;
37 }
38 const CBMStringConstantMap *map = &ctx->string_constants;
39 for (int i = 0; i < map->count; i++) {
40 if (strcmp(map->names[i], name) == 0) {
41 return map->values[i];
42 }
43 }
44 return NULL;
45}
46
47/* Check if a node type is a string literal */
48static int is_string_like(const char *kind) {

Callers 4

process_keyword_argFunction · 0.85
extract_call_argsFunction · 0.85
extract_string_valueFunction · 0.85
extract_positional_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected