nom::alt_complete
[−]
[src]
macro_rules! alt_complete { ($i:expr, $e:ident | $($rest:tt)*) => { ... }; ($i:expr, $subrule:ident!( $($args:tt)*) | $($rest:tt)*) => { ... }; ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr } | $($rest:tt)+) => { ... }; ($i:expr, $e:ident => { $gen:expr } | $($rest:tt)*) => { ... }; ($i:expr, $e:ident => { $gen:expr }) => { ... }; ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr }) => { ... }; ($i:expr, $e:ident) => { ... }; ($i:expr, $subrule:ident!( $($args:tt)*)) => { ... }; }
This is a combination of the alt!
and complete!
combinators. Rather
than returning Incomplete
on partial input, alt_complete!
will try the
next alternative in the chain. You should use this only if you know you
will not receive partial input for the rules you're trying to match (this
is almost always the case for parsing programming languages).