nom::switch! [] [src]

macro_rules! switch {
    ($i:expr, $submac:ident!( $($args:tt)*), $($p:pat => $subrule:ident!( $($args2:tt)* ))|*) => { ... };
    ($i:expr, $e:ident, $($rest:tt)*) => { ... };
}

switch!(I -> IResult<I,P>, P => I -> IResult<I,O> | ... | P => I -> IResult<I,O> ) => I -> IResult<I, O> choose the next parser depending on the result of the first one, if successful