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. #include "toolchain/check/handle.h"
  6. namespace Carbon::Check {
  7. auto HandleParseNode(Context& /*context*/, Parse::EmptyDeclId /*node_id*/)
  8. -> bool {
  9. // Empty declarations have no actions associated.
  10. return true;
  11. }
  12. auto HandleParseNode(Context& context, Parse::InvalidParseId node_id) -> bool {
  13. return context.TODO(node_id, "HandleInvalidParse");
  14. }
  15. auto HandleParseNode(Context& context, Parse::InvalidParseStartId node_id)
  16. -> bool {
  17. return context.TODO(node_id, "HandleInvalidParseStart");
  18. }
  19. auto HandleParseNode(Context& context, Parse::InvalidParseSubtreeId node_id)
  20. -> bool {
  21. return context.TODO(node_id, "HandleInvalidParseSubtree");
  22. }
  23. auto HandleParseNode(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