diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 18:12:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 18:12:59 -0400 |
| commit | 3eae595c1749c8908e305a405f0767fb96c29acf (patch) | |
| tree | 23113a32e9c68a746b5e35966381421f0fbf86f4 /stdlib/util.h | |
| parent | 36e93a8a9933ce6be91b45e9ac7a6c634d074a7e (diff) | |
Codegen improvements and fixes
Diffstat (limited to 'stdlib/util.h')
| -rw-r--r-- | stdlib/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
