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

Function php_lsp_init

internal/cbm/lsp/php_lsp.c:139–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137/* ── init / context ─────────────────────────────────────────────── */
138
139void php_lsp_init(PHPLSPContext *ctx, CBMArena *arena, const char *source, int source_len,
140 const CBMTypeRegistry *registry, const char *module_qn,
141 CBMResolvedCallArray *out) {
142 memset(ctx, 0, sizeof(*ctx));
143 ctx->arena = arena;
144 ctx->source = source;
145 ctx->source_len = source_len;
146 ctx->registry = registry;
147 ctx->module_qn = module_qn;
148 ctx->current_namespace_qn = "";
149 ctx->resolved_calls = out;
150 ctx->current_scope = cbm_scope_push(arena, NULL);
151
152 const char *dbg = getenv("CBM_LSP_DEBUG");
153 ctx->debug = (dbg && dbg[0]);
154}
155
156void php_lsp_add_use(PHPLSPContext *ctx, const char *local_name, const char *target_qn,
157 int use_kind) {

Callers 2

cbm_run_php_lspFunction · 0.85
cbm_run_php_lsp_crossFunction · 0.85

Calls 1

cbm_scope_pushFunction · 0.85

Tested by

no test coverage detected