pear::parsers

Function take_while

Source
pub fn take_while<I, F>(input: &mut Pear<I>, cond: F) -> Result<I::Many, I>
where I: Input, F: FnMut(&I::Token) -> bool,
Expand description

Consumes tokens while cond matches and returns them. Succeeds even if no tokens match.