pub fn parse_source(file: &SourceFile) -> (Program, Vec<SyntaxError>)Expand description
Lexes file then parses it, merging the lexer’s errors first. If the
lexer reported anything, parsing is skipped: a file with lexical errors
has no reliable token stream to parse from, so its Program is empty
and only the lexer’s errors are returned. The compiler’s resolve
module calls this for every file it loads.