Skip to main content

macro_if

Macro macro_if 

Source
macro_rules! macro_if {
    (true => $($t:tt)*) => { ... };
    (false => $($t:tt)*) => { ... };
    (if true { $($t:tt)* } else { $($f:tt)*}) => { ... };
    (if false { $($t:tt)* } else { $($f:tt)*}) => { ... };
    (if0 0 { $($t:tt)* } else { $($f:tt)*}) => { ... };
    (if0 $n:literal { $($t:tt)* } else { $($f:tt)*}) => { ... };
    (iftt () { $($t:tt)* } else { $($f:tt)*}) => { ... };
    (iftt ($($tt:tt)+) { $($t:tt)* } else { $($f:tt)*}) => { ... };
}