mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 22:02:51 +01:00
Replace int lines with file-associated SourceLocations (#779)
Most interesting changes should be ast/source_location.h and syntax/parse_and_lex_context.h
This commit is contained in:
@@ -6,14 +6,11 @@
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
// Writes a syntax error diagnostic, containing message, for the input file at
|
||||
// the given line, to standard error.
|
||||
auto ParseAndLexContext::PrintDiagnostic(const std::string& message,
|
||||
int line_num) -> void {
|
||||
auto ParseAndLexContext::PrintDiagnostic(const std::string& message) -> void {
|
||||
// TODO: Do we really want this to be fatal? It makes the comment and the
|
||||
// name a lie, and renders some of the other yyparse() result propagation code
|
||||
// moot.
|
||||
FATAL_COMPILATION_ERROR(line_num) << message;
|
||||
FATAL_COMPILATION_ERROR(SourceLoc()) << message;
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user