Function rustc_parse::new_parser_from_source_str
source ยท pub fn 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. On failure, the errors must be consumed via
unwrap_or_emit_fatal
, emit
, cancel
, etc., otherwise a panic will occur when they are
dropped.