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

Function kt_push_implicit_call

internal/cbm/extract_calls.c:3387–3397  ·  view source on GitHub ↗

Kotlin convention-desugared calls that the call walk never sees as call_expressions: `val (a,b) = e` -> e.component1()/e.component2(); and `for (x in e)` -> e.iterator()/hasNext()/next(). Record textual calls to those operator-convention method names so the LSP's lsp_kt_destructure / lsp_kt_iterator resolutions have a call site to join (names match the LSP's).

Source from the content-addressed store, hash-verified

3385// operator-convention method names so the LSP's lsp_kt_destructure /
3386// lsp_kt_iterator resolutions have a call site to join (names match the LSP's).
3387static void kt_push_implicit_call(CBMExtractCtx *ctx, TSNode node, const char *callee,
3388 const char *enclosing_func_qn) {
3389 CBMCall call = {0};
3390 call.callee_name = callee;
3391 call.enclosing_func_qn = enclosing_func_qn;
3392 call.start_line = (int)ts_node_start_point(node).row + TS_LINE_OFFSET;
3393 call.site_start_byte = ts_node_start_byte(node);
3394 call.site_end_byte = ts_node_end_byte(node);
3395 call.requires_lsp_resolution = true;
3396 cbm_calls_push(&ctx->result->calls, ctx->arena, call);
3397}
3398
3399static void push_cpp_semantic_call_candidate(CBMExtractCtx *ctx, TSNode node,
3400 const char *callee_name,

Callers 1

Calls 1

cbm_calls_pushFunction · 0.85

Tested by

no test coverage detected