aboutsummaryrefslogtreecommitdiffstats
path: root/cppawk-include/case-priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'cppawk-include/case-priv.h')
-rw-r--r--cppawk-include/case-priv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cppawk-include/case-priv.h b/cppawk-include/case-priv.h
index 6421877..3676e2b 100644
--- a/cppawk-include/case-priv.h
+++ b/cppawk-include/case-priv.h
@@ -64,8 +64,14 @@
#define __mtch_next(p, \
x) p || (__val ~ (x))
+#if !__have_let
#define __case_temps __val, __once, __pass
-#define __case(expr) for ((__once = 1) && (__pass = 0) || (__val = expr); \
+#else
+#define __case_temps __ign
+#endif
+
+#define __case(expr) __let (__val, __once, __pass) \
+ for ((__once = 1) && (__pass = 0) || (__val = expr); \
__once; \
__once = 0)
#define __of(...) __clause(__varexpand(__of_first, __of_next, \