diff options
Diffstat (limited to 'cppawk-include/case-priv.h')
-rw-r--r-- | cppawk-include/case-priv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cppawk-include/case-priv.h b/cppawk-include/case-priv.h index 2d99533..6421877 100644 --- a/cppawk-include/case-priv.h +++ b/cppawk-include/case-priv.h @@ -41,10 +41,15 @@ #define __ca_first(x) case x: #define __ca_next(p, x) p case x: +#define __mx_first(x) __of(x) +#define __mx_next(p, x) p case x: + #define __case_temps __ign #define __case(expr) switch (expr) #define __of(...) __varexpand(__ca_first, __ca_next, __VA_ARGS__) {{{ #define __matching(...) __varexpand(__ca_first, __ca_next, __VA_ARGS__) {{{ +#define __mixed(x, y) __varexpand(__ca_first, __ca_next, __splice(x)) \ + __varexpand(__ca_first, __ca_next, __splice(y)) {{{ #define __cbreak break; }}} #define __cfall }}} #define __cret(val) return val; }}} @@ -67,6 +72,10 @@ __VA_ARGS__)) {{{ #define __matching(...) __clause(__varexpand(__mtch_first, mtch_next, \ __VA_ARGS__)) {{{ +#define __mixed(x, y) __clause(__varexpand(__of_first, __of_next, \ + __splice(x)) || \ + __varexpand(__mtch_first, __mtch_next, \ + __splice(y))) {{{ #define __cbreak break; }}} #define __creturn(val) return val; }}} #define __cfall }}} |