Skip to main content

seq

Macro seq 

Source
macro_rules! seq {
    ($first:expr, $($rest:expr),* $(,)?) => { ... };
}
Expand description

Create a sequence of parsers or patterns.

    shrimple_parser::{seq, parser::one, Pattern, Parser, ParsingResult},
    std::convert::Infallible,
};
 
seq!(
    one(seq!('a', 'b', 'c')),
    one('d'),
)

Is the same as

    shrimple_parser::{seq, parser::one, Pattern, Parser, ParsingResult},
    std::convert::Infallible,
};
 
one('a'.and('b').and('c'))
    .and(one('d'))