pub fn lex_partial(source: &str) -> (Vec<Spanned>, Vec<LexErrorLocation>)Expand description
Lex source code, returning tokens even if there are errors.
This is useful for editor tooling where you want partial results. Errors are collected but don’t prevent returning valid tokens.
§Returns
A tuple of (tokens, errors). The tokens vector contains all valid tokens found, and the errors vector contains all lex errors encountered.