semantics_handle_paren.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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/semantics/semantics_context.h"
  5. namespace Carbon {
  6. auto SemanticsHandleParenExpression(SemanticsContext& context,
  7. ParseTree::Node parse_node) -> bool {
  8. auto value_id = context.node_stack().Pop<SemanticsNodeId>();
  9. context.node_stack().PopAndDiscardSoloParseNode(
  10. ParseNodeKind::ParenExpressionOrTupleLiteralStart);
  11. context.node_stack().Push(parse_node, value_id);
  12. return true;
  13. }
  14. auto SemanticsHandleParenExpressionOrTupleLiteralStart(
  15. SemanticsContext& context, ParseTree::Node parse_node) -> bool {
  16. context.node_stack().Push(parse_node);
  17. return true;
  18. }
  19. auto SemanticsHandleTupleLiteral(SemanticsContext& context,
  20. ParseTree::Node parse_node) -> bool {
  21. return context.TODO(parse_node, "HandleTupleLiteral");
  22. }
  23. auto SemanticsHandleTupleLiteralComma(SemanticsContext& context,
  24. ParseTree::Node parse_node) -> bool {
  25. return context.TODO(parse_node, "HandleTupleLiteralComma");
  26. }
  27. } // namespace Carbon