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

Function cbm_scope_contains

internal/cbm/lsp/scope.c:107–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool cbm_scope_contains(const CBMScope *scope, const char *name) {
108 if (!name) {
109 return false;
110 }
111 for (const CBMScope *s = scope; s != NULL; s = s->parent) {
112 for (const CBMScopeChunk *c = s->chunks; c != NULL; c = c->next) {
113 for (int i = 0; i < c->used; i++) {
114 if (c->bindings[i].name && strcmp(c->bindings[i].name, name) == 0) {
115 return true;
116 }
117 }
118 }
119 }
120 return false;
121}
122
123const char *cbm_scope_lookup_callable(const CBMScope *scope, const char *name) {
124 if (!name) {

Callers 15

py_scope_bindFunction · 0.85
py_scope_bind_callableFunction · 0.85
py_emit_call_forFunction · 0.85
py_bind_module_functionFunction · 0.85
go_eval_expr_typeFunction · 0.85
go_exact_callable_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected