Struct peresil::Alternate [−][src]
#[must_use]pub struct Alternate<'pm, P: 'pm, T, E: 'pm, S: 'pm> { /* fields omitted */ }
Follows the first successful parsing path.
Methods
impl<'pm, P, T, E, S> Alternate<'pm, P, T, E, S> where
P: Point,
E: Recoverable,
[src]
impl<'pm, P, T, E, S> Alternate<'pm, P, T, E, S> where
P: Point,
E: Recoverable,
pub fn one<F>(self, parser: F) -> Alternate<'pm, P, T, E, S> where
F: FnOnce(&mut ParseMaster<P, E, S>, P) -> Progress<P, T, E>,
[src]
pub fn one<F>(self, parser: F) -> Alternate<'pm, P, T, E, S> where
F: FnOnce(&mut ParseMaster<P, E, S>, P) -> Progress<P, T, E>,
Run one alternative parser.
pub fn finish(self) -> Progress<P, T, E>
[src]
pub fn finish(self) -> Progress<P, T, E>
Complete the alternatives, returning the first successful branch.