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

Function walk_readwrites

internal/cbm/extract_semantic.c:272–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272static void walk_readwrites(CBMExtractCtx *ctx, TSNode root, const CBMLangSpec *spec) {
273 TSNodeStack stack;
274 ts_nstack_init(&stack, ctx, CBM_SZ_512);
275 ts_nstack_push(&stack, root);
276 while (stack.count > 0) {
277 TSNode node = ts_nstack_pop(&stack);
278 if (cbm_kind_in_set(node, spec->assignment_node_types)) {
279 try_emit_assignment_write(ctx, node, cbm_enclosing_func_qn_cached(ctx, node));
280 }
281 uint32_t count = ts_node_child_count(node);
282 for (int i = (int)count - LAST_IDX; i >= 0; i--) {
283 ts_nstack_push(&stack, ts_node_child(node, (uint32_t)i));
284 }
285 }
286}
287
288void cbm_extract_semantic(CBMExtractCtx *ctx) {
289 const CBMLangSpec *spec = cbm_lang_spec(ctx->language);

Callers 1

cbm_extract_semanticFunction · 0.85

Calls 6

ts_nstack_initFunction · 0.85
ts_nstack_pushFunction · 0.85
ts_nstack_popFunction · 0.85
cbm_kind_in_setFunction · 0.85

Tested by

no test coverage detected