handle_parameter_list.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 HandleDeducedParameterList(Context& context, Parse::Node parse_node)
  7. -> bool {
  8. return context.TODO(parse_node, "HandleDeducedParameterList");
  9. }
  10. auto HandleDeducedParameterListStart(Context& context, Parse::Node parse_node)
  11. -> bool {
  12. return context.TODO(parse_node, "HandleDeducedParameterListStart");
  13. }
  14. auto HandleParameterList(Context& context, Parse::Node parse_node) -> bool {
  15. auto refs_id = context.ParamOrArgEnd(Parse::NodeKind::ParameterListStart);
  16. context.PopScope();
  17. context.node_stack()
  18. .PopAndDiscardSoloParseNode<Parse::NodeKind::ParameterListStart>();
  19. context.node_stack().Push(parse_node, refs_id);
  20. return true;
  21. }
  22. auto HandleParameterListComma(Context& context, Parse::Node /*parse_node*/)
  23. -> bool {
  24. context.ParamOrArgComma();
  25. return true;
  26. }
  27. auto HandleParameterListStart(Context& context, Parse::Node parse_node)
  28. -> bool {
  29. context.PushScope();
  30. context.node_stack().Push(parse_node);
  31. context.ParamOrArgStart();
  32. return true;
  33. }
  34. } // namespace Carbon::Check