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

Function lookup_string_constant

internal/cbm/extract_calls.c:29–40  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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