pub fn parse_with_lexer<'a, L, S, Lex>(
lexer: &Lex,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<L>,
run: impl FnOnce(&mut ParserState<'a, L, S>) -> Result<&'a GreenNode<'a, L>, OakError>,
) -> ParseOutput<'a, L>Expand description
Helper for implementing Parser::parse with automatic lexing.
This function handles the boilerplate of preparing the cache, ensuring lexing is performed, setting up the parser state, and committing the result.