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

Function handle_readwrites

internal/cbm/extract_semantic.c:323–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void handle_readwrites(CBMExtractCtx *ctx, TSNode node, const CBMLangSpec *spec, WalkState *state) {
324 if (!spec->assignment_node_types || !spec->assignment_node_types[0]) {
325 return;
326 }
327
328 if (cbm_kind_in_set(node, spec->assignment_node_types)) {
329 TSNode left = resolve_write_lhs_node(node);
330
331 if (!ts_node_is_null(left)) {
332 char *name = resolve_lhs_write_name(ctx, left);
333 if (name && name[0] && !cbm_is_keyword(name, ctx->language)) {
334 CBMReadWrite rw;
335 rw.var_name = name;
336 rw.is_write = true;
337 rw.enclosing_func_qn = state->enclosing_func_qn;
338 cbm_rw_push(&ctx->result->rw, ctx->arena, rw);
339 }
340 }
341 }
342}

Callers 1

cbm_extract_unifiedFunction · 0.85

Calls 5

cbm_kind_in_setFunction · 0.85
resolve_write_lhs_nodeFunction · 0.85
resolve_lhs_write_nameFunction · 0.85
cbm_is_keywordFunction · 0.85
cbm_rw_pushFunction · 0.85

Tested by

no test coverage detected