parse_and_lex_context.cpp 603 B

12345678910111213141516
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "executable_semantics/syntax/parse_and_lex_context.h"
  5. namespace Carbon {
  6. auto ParseAndLexContext::PrintDiagnostic(const std::string& message) -> void {
  7. // TODO: Do we really want this to be fatal? It makes the comment and the
  8. // name a lie, and renders some of the other yyparse() result propagation code
  9. // moot.
  10. FATAL_COMPILATION_ERROR(source_loc()) << message;
  11. }
  12. } // namespace Carbon