Find a variable's node in a binding */
| 2433 | |
| 2434 | /* Find a variable's node in a binding */ |
| 2435 | static cbm_node_t *binding_get(binding_t *b, const char *var) { |
| 2436 | for (int i = 0; i < b->var_count; i++) { |
| 2437 | if (strcmp(b->var_names[i], var) == 0) { |
| 2438 | return &b->var_nodes[i]; |
| 2439 | } |
| 2440 | } |
| 2441 | return NULL; |
| 2442 | } |
| 2443 | |
| 2444 | /* Deep copy a node: heap-dup all string fields so the binding owns them */ |
| 2445 | static void node_deep_copy(cbm_node_t *dst, const cbm_node_t *src) { |
no outgoing calls
no test coverage detected