Iterative throw walker
| 124 | |
| 125 | // Iterative throw walker |
| 126 | static 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 |
no test coverage detected