lex

Function lex 

Source
pub fn lex(file: FileId, src: &str, diags: &mut Diagnostics) -> Vec<Token>
Expand description

Lex and lay out one file.

Errors are reported rather than thrown: a file with an unlexable character still produces a token stream, so the parser can carry on and report more than one problem per run.