Skip to main content

choice

Macro choice 

Source
macro_rules! choice {
    () => { ... };
    ($($parser: expr),+) => { ... };
}
Expand description

Takes a number of parsers, and tries to apply each one to the input in order. Returns the result of the first one that succeeds, or fails if all of them fail.