Function add_error_at_eof
pub fn add_error_at_eof<S: Into<String>>(
parser: &Parser,
driver: &mut Driver,
error: S,
)Expand description
Emits an error diagnostic at the end of the source file.
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 when the parser is at EOF.