/*
nobreak -- TADS 3 extension
This is a very simple extension that lets you write switch statements without having to write an explicit "break" after every case. It also lets you specify multiple values for a single case. All you have to do is #include this file from any .t file, and then in that file you can do like this:
switch(x) {
case(1):
"It is one!";
case(2, 3, 4):
"It's two through four!";
case('heffelump', 'woozle'):
"It's very confoozle!";
default:
"It's something else entirely!";
}
The above code will always print exactly one of those output strings.
Note that the values in the cases still have to be constants.
This "library" was written by Brendan Barnwell (
[email protected])
*/
enum uselessSwitchCase;
#define case(opt...) \
case uselessSwitchCase: \
break; \
opt#foreach! case opt!:!
#define default \
case uselessSwitchCase: \
break; \
default