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