handle_noop.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 "toolchain/check/context.h"
  5. namespace Carbon::Check {
  6. auto HandleEmptyDecl(Context& /*context*/, Parse::EmptyDeclId /*node_id*/)
  7. -> bool {
  8. // Empty declarations have no actions associated.
  9. return true;
  10. }
  11. auto HandleInvalidParse(Context& context, Parse::InvalidParseId node_id)
  12. -> bool {
  13. return context.TODO(node_id, "HandleInvalidParse");
  14. }
  15. auto HandleInvalidParseStart(Context& context,
  16. Parse::InvalidParseStartId node_id) -> bool {
  17. return context.TODO(node_id, "HandleInvalidParseStart");
  18. }
  19. auto HandleInvalidParseSubtree(Context& context,
  20. Parse::InvalidParseSubtreeId node_id) -> bool {
  21. return context.TODO(node_id, "HandleInvalidParseSubtree");
  22. }
  23. auto HandlePlaceholder(Context& /*context*/, Parse::PlaceholderId /*node_id*/)
  24. -> bool {
  25. CARBON_FATAL()
  26. << "Placeholder node should always be replaced before parse completes";
  27. }
  28. } // namespace Carbon::Check