[][src]Function rustc_parse::maybe_source_file_to_parser

fn maybe_source_file_to_parser(
    sess: &ParseSess,
    source_file: Lrc<SourceFile>
) -> Result<Parser, Vec<Diagnostic>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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