pub fn new_parser_from_simple_source_str(
psess: &ParseSess,
name: FileName,
source: String,
) -> Result<Parser<'_>, Vec<Diag<'_>>>
Expand description
Creates a new parser from a simple (no shebang, no frontmatter) 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.