Macro unrest_tmp_synom::cond
[−]
[src]
macro_rules! cond { ($i:expr, $cond:expr, $submac:ident!( $($args:tt)* )) => { ... }; ($i:expr, $cond:expr, $f:expr) => { ... }; }
Conditionally execute the given parser.
If you are familiar with nom, this is nom's cond_with_error
parser.
- Syntax:
cond!(CONDITION, THING)
- Output:
Some(THING)
if the condition is true, elseNone