pub fn state<'i, R: RuleType, F>(
input: &'i str,
f: F,
) -> Result<Pairs<'i, R>, Error<R>>
Expand description
Creates a ParserState
from a &str
, supplying it to a closure f
.
ยงExamples
let input = "";
pest::state::<(), _>(input, |s| Ok(s)).unwrap();