Function rustc_parse::maybe_new_parser_from_source_str

source ·
pub fn maybe_new_parser_from_source_str(
    psess: &ParseSess,
    name: FileName,
    source: String
) -> Result<Parser<'_>, Vec<Diag<'_>>>
Expand description

Creates a new parser from a source string. Returns any buffered errors from lexing the initial token stream; these must be consumed via emit, cancel, etc., otherwise a panic will occur when they are dropped.