Function rustc_parse::maybe_source_file_to_parser

source ·
pub(crate) fn maybe_source_file_to_parser(
    psess: &ParseSess,
    source_file: Lrc<SourceFile>
) -> Result<Parser<'_>, Vec<Diag<'_>>>
Expand description

Given a session and a source_file, return a parser. Returns any buffered errors from lexing the initial token stream.