From 3eae595c1749c8908e305a405f0767fb96c29acf Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 17 Mar 2025 18:12:59 -0400 Subject: Codegen improvements and fixes --- stdlib/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib') diff --git a/stdlib/util.h b/stdlib/util.h index 98c087a7..6f79bed6 100644 --- a/stdlib/util.h +++ b/stdlib/util.h @@ -19,6 +19,8 @@ #define IF_DECLARE(decl, expr, block) if (({ decl; expr ? ({ block; 1; }) : 0; })) {} +#define WHEN(subj, var, body) { auto var = subj; switch (var.$tag) body } + #ifndef auto #define auto __auto_type #endif -- cgit v1.2.3