| 2734 | /* ── CASE expression evaluation ───────────────────────────────── */ |
| 2735 | |
| 2736 | static const char *eval_case_expr(const cbm_case_expr_t *k, binding_t *b) { |
| 2737 | if (!k) { |
| 2738 | return ""; |
| 2739 | } |
| 2740 | for (int i = 0; i < k->branch_count; i++) { |
| 2741 | if (eval_expr(k->branches[i].when_expr, b)) { |
| 2742 | return k->branches[i].then_val ? k->branches[i].then_val : ""; |
| 2743 | } |
| 2744 | } |
| 2745 | return k->else_val ? k->else_val : ""; |
| 2746 | } |
| 2747 | |
| 2748 | /* ── Scan nodes for a pattern ─────────────────────────────────── */ |
| 2749 |
no test coverage detected