Function add_error
pub fn add_error<S: Into<String>>(
driver: &mut Driver,
error: S,
location: SourceLocation,
)Expand description
Emits an error diagnostic with the given message.
The diagnostic will be ignored if the parser is being used in a call to Parser::disable_diagnostics_during.
This is a helper function which simplifies the construction of error diagnostics.