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

Function try_emit_assignment_write

internal/cbm/extract_semantic.c:249–262  ·  view source on GitHub ↗

Try to emit a write for an assignment node.

Source from the content-addressed store, hash-verified

247
248// Try to emit a write for an assignment node.
249static void try_emit_assignment_write(CBMExtractCtx *ctx, TSNode node, const char *func_qn) {
250 TSNode left = resolve_write_lhs_node(node);
251 if (ts_node_is_null(left)) {
252 return;
253 }
254 char *name = resolve_lhs_write_name(ctx, left);
255 if (name && name[0] && !cbm_is_keyword(name, ctx->language)) {
256 CBMReadWrite rw;
257 rw.var_name = name;
258 rw.is_write = true;
259 rw.enclosing_func_qn = func_qn;
260 cbm_rw_push(&ctx->result->rw, ctx->arena, rw);
261 }
262}
263
264static void walk_readwrites(CBMExtractCtx *ctx, TSNode root, const CBMLangSpec *spec) {
265 TSNodeStack stack;

Callers 1

walk_readwritesFunction · 0.85

Calls 4

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