choices

Macro choices 

Source
macro_rules! choices {
    (otherwise => $q:expr) => { ... };
    ($p:expr => $q:expr , $($ts:tt)+) => { ... };
}
Expand description

Helper to combine deeply nested choices.


choice(P1, Q1, choice(P2, Q2, choice(P3, Q3, QO)))
// is equivalent to
choices!{
    P1        => Q1,
    P2        => Q2,
    P3        => Q3,
    otherwise => QO,
}