handle_noop.cpp 1.2 KB

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