Skip to main content

resume

Function resume 

Source
pub fn resume(
    state: ParserState,
    src: &str,
    visitor: &mut impl ProgramVisitor,
) -> ParserState
Expand description

Resumes parsing from a saved ParserState.

Use this when a visitor returned ControlFlow::Break to continue from the next block. Pass the same src and visitor (or one that is logically equivalent). Returns the new state after this chunk of parsing; if the visitor breaks again, pass that state to the next resume call.

ยงNote

The implementation assumes that the src string ends with a complete line. Behaviour is unspecified if parsing resumes in the middle of a line.