[][src]Function rustc_parse::maybe_file_to_stream

pub fn maybe_file_to_stream(
    sess: &ParseSess,
    source_file: Lrc<SourceFile>,
    override_span: Option<Span>
) -> Result<(TokenStream, Vec<UnmatchedBrace>), 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, produces a sequence of token trees. Returns any buffered errors from parsing the token stream.