Find a variable's node in a binding */
| 2513 | |
| 2514 | /* Find a variable's node in a binding */ |
| 2515 | static cbm_node_t *binding_get(binding_t *b, const char *var) { |
| 2516 | for (int i = 0; i < b->var_count; i++) { |
| 2517 | if (strcmp(b->var_names[i], var) == 0) { |
| 2518 | return &b->var_nodes[i]; |
| 2519 | } |
| 2520 | } |
| 2521 | return NULL; |
| 2522 | } |
| 2523 | |
| 2524 | /* Deep copy a node: heap-dup all string fields so the binding owns them */ |
| 2525 | static void node_deep_copy(cbm_node_t *dst, const cbm_node_t *src) { |
no outgoing calls
no test coverage detected