summaryrefslogtreecommitdiff
path: root/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'base.h')
-rw-r--r--base.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base.h b/base.h
index 293d95e..a526c6b 100644
--- a/base.h
+++ b/base.h
@@ -64,6 +64,13 @@ typedef unsigned long ulong;
typedef long long llong;
typedef unsigned long long ullong;
+// allows
+// switch (c) {
+// case ANY_DIGIT:
+// ...
+// }
+#define ANY_DIGIT '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9'
+
#if __clang__
#define ENUM_U8 typedef enum : u8
#define ENUM_U8_END(name) name