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