| 3000 | /* ── CASE expression evaluation ───────────────────────────────── */ |
| 3001 | |
| 3002 | static const char *eval_case_expr(const cbm_case_expr_t *k, binding_t *b) { |
| 3003 | if (!k) { |
| 3004 | return ""; |
| 3005 | } |
| 3006 | for (int i = 0; i < k->branch_count; i++) { |
| 3007 | if (eval_expr(k->branches[i].when_expr, b)) { |
| 3008 | return k->branches[i].then_val ? k->branches[i].then_val : ""; |
| 3009 | } |
| 3010 | } |
| 3011 | return k->else_val ? k->else_val : ""; |
| 3012 | } |
| 3013 | |
| 3014 | /* ── Scan nodes for a pattern ─────────────────────────────────── */ |
| 3015 |
no test coverage detected