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

Function walk_throws

internal/cbm/extract_semantic.c:126–138  ·  view source on GitHub ↗

Iterative throw walker

Source from the content-addressed store, hash-verified

124
125// Iterative throw walker
126static void walk_throws(CBMExtractCtx *ctx, TSNode root, const CBMLangSpec *spec) {
127 TSNodeStack stack;
128 ts_nstack_init(&stack, ctx->arena, CBM_SZ_512);
129 ts_nstack_push(&stack, ctx->arena, root);
130 while (stack.count > 0) {
131 TSNode node = ts_nstack_pop(&stack);
132 process_throw_node(ctx, node, spec);
133 uint32_t count = ts_node_child_count(node);
134 for (int i = (int)count - LAST_IDX; i >= 0; i--) {
135 ts_nstack_push(&stack, ctx->arena, ts_node_child(node, (uint32_t)i));
136 }
137 }
138}
139
140// --- Read/Write detection (iterative) ---
141

Callers 1

cbm_extract_semanticFunction · 0.85

Calls 4

ts_nstack_initFunction · 0.85
ts_nstack_pushFunction · 0.85
ts_nstack_popFunction · 0.85
process_throw_nodeFunction · 0.85

Tested by

no test coverage detected