| 3370 | /* ── CASE expression evaluation ───────────────────────────────── */ |
| 3371 | |
| 3372 | static const char *eval_case_expr(const cbm_case_expr_t *k, binding_t *b) { |
| 3373 | if (!k) { |
| 3374 | return ""; |
| 3375 | } |
| 3376 | for (int i = 0; i < k->branch_count; i++) { |
| 3377 | if (eval_expr(k->branches[i].when_expr, b)) { |
| 3378 | return k->branches[i].then_val ? k->branches[i].then_val : ""; |
| 3379 | } |
| 3380 | } |
| 3381 | return k->else_val ? k->else_val : ""; |
| 3382 | } |
| 3383 | |
| 3384 | /* ── Scan nodes for a pattern ─────────────────────────────────── */ |
| 3385 |
no test coverage detected