Explorar o código

Change struct literal parsing to use placeholders. (#3850)

This is achieving a similar goal as #3849, using placeholders instead of
an ambiguous start node to clarify structure and incrementally simplify
checking. The benefit isn't quite as big here because both paths are
structs, and so checking is more consistent than paren exprs versus
tuples. But I think this removes the only other multi-purpose parse
node.

This uses StructLiteral/StructTypeLiteral naming, reflecting equivalent
SemIR naming. Note, I would lean towards renaming StructLiteral to
StructValueLiteral, but I think consistency in naming takes precedence.
Any renames of StructLiteral might be better in a separate PR.

StructFieldType/StructFieldValue -> StructTypeField/StructField is
trying to making the reading more consistent with
StructTypeLiteral/StructLiteral. SemIR has StructTypeField but not a
value equivalent.
Jon Ross-Perkins %!s(int64=2) %!d(string=hai) anos
pai
achega
a034f86272
Modificáronse 31 ficheiros con 129 adicións e 130 borrados
  1. 16 16
      toolchain/check/handle_struct.cpp
  2. 4 4
      toolchain/check/node_stack.h
  3. 2 2
      toolchain/check/param_and_arg_refs_stack.h
  4. 13 11
      toolchain/parse/handle_brace_expr.cpp
  5. 15 18
      toolchain/parse/node_kind.def
  6. 2 2
      toolchain/parse/testdata/class/fn_definitions.carbon
  7. 1 1
      toolchain/parse/testdata/for/fail_missing_cond.carbon
  8. 2 2
      toolchain/parse/testdata/struct/fail_comma_only.carbon
  9. 3 3
      toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon
  10. 3 3
      toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon
  11. 2 2
      toolchain/parse/testdata/struct/fail_dot_only.carbon
  12. 1 1
      toolchain/parse/testdata/struct/fail_dot_paren.carbon
  13. 3 3
      toolchain/parse/testdata/struct/fail_dot_string_colon.carbon
  14. 3 3
      toolchain/parse/testdata/struct/fail_dot_string_equals.carbon
  15. 4 4
      toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon
  16. 4 4
      toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon
  17. 2 2
      toolchain/parse/testdata/struct/fail_identifier_colon.carbon
  18. 2 2
      toolchain/parse/testdata/struct/fail_identifier_equals.carbon
  19. 2 2
      toolchain/parse/testdata/struct/fail_identifier_only.carbon
  20. 2 2
      toolchain/parse/testdata/struct/fail_missing_type.carbon
  21. 2 2
      toolchain/parse/testdata/struct/fail_missing_value.carbon
  22. 3 3
      toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon
  23. 3 3
      toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon
  24. 4 4
      toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon
  25. 2 2
      toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon
  26. 2 2
      toolchain/parse/testdata/struct/fail_type_no_designator.carbon
  27. 2 2
      toolchain/parse/testdata/struct/no_entries.carbon
  28. 4 4
      toolchain/parse/testdata/struct/one_entry_no_comma.carbon
  29. 4 4
      toolchain/parse/testdata/struct/one_entry_with_comma.carbon
  30. 6 6
      toolchain/parse/testdata/struct/two_entries.carbon
  31. 11 11
      toolchain/parse/typed_nodes.h

+ 16 - 16
toolchain/check/handle_struct.cpp

@@ -7,14 +7,19 @@
 
 
 namespace Carbon::Check {
 namespace Carbon::Check {
 
 
-auto HandleStructLiteralOrStructTypeLiteralStart(
-    Context& context, Parse::StructLiteralOrStructTypeLiteralStartId node_id)
+auto HandleStructTypeLiteralStart(Context& context,
+                                  Parse::StructTypeLiteralStartId node_id)
     -> bool {
     -> bool {
   context.scope_stack().Push();
   context.scope_stack().Push();
   context.node_stack().Push(node_id);
   context.node_stack().Push(node_id);
-  // At this point we aren't sure whether this will be a value or type literal,
-  // so we push onto args irrespective. It just won't be used for a type
-  // literal.
+  context.param_and_arg_refs_stack().Push();
+  return true;
+}
+
+auto HandleStructLiteralStart(Context& context,
+                              Parse::StructLiteralStartId node_id) -> bool {
+  context.scope_stack().Push();
+  context.node_stack().Push(node_id);
   context.args_type_info_stack().Push();
   context.args_type_info_stack().Push();
   context.param_and_arg_refs_stack().Push();
   context.param_and_arg_refs_stack().Push();
   return true;
   return true;
@@ -34,8 +39,7 @@ auto HandleStructComma(Context& context, Parse::StructCommaId /*node_id*/)
   return true;
   return true;
 }
 }
 
 
-auto HandleStructFieldValue(Context& context, Parse::StructFieldValueId node_id)
-    -> bool {
+auto HandleStructField(Context& context, Parse::StructFieldId node_id) -> bool {
   auto value_inst_id = context.node_stack().PopExpr();
   auto value_inst_id = context.node_stack().PopExpr();
   auto [name_node, name_id] = context.node_stack().PopNameWithNodeId();
   auto [name_node, name_id] = context.node_stack().PopNameWithNodeId();
 
 
@@ -49,7 +53,7 @@ auto HandleStructFieldValue(Context& context, Parse::StructFieldValueId node_id)
   return true;
   return true;
 }
 }
 
 
-auto HandleStructFieldType(Context& context, Parse::StructFieldTypeId node_id)
+auto HandleStructTypeField(Context& context, Parse::StructTypeFieldId node_id)
     -> bool {
     -> bool {
   auto [type_node, type_id] = context.node_stack().PopExprWithNodeId();
   auto [type_node, type_id] = context.node_stack().PopExprWithNodeId();
   SemIR::TypeId cast_type_id = ExprAsType(context, type_node, type_id);
   SemIR::TypeId cast_type_id = ExprAsType(context, type_node, type_id);
@@ -92,12 +96,11 @@ static auto DiagnoseDuplicateNames(Context& context,
 auto HandleStructLiteral(Context& context, Parse::StructLiteralId node_id)
 auto HandleStructLiteral(Context& context, Parse::StructLiteralId node_id)
     -> bool {
     -> bool {
   auto refs_id = context.param_and_arg_refs_stack().EndAndPop(
   auto refs_id = context.param_and_arg_refs_stack().EndAndPop(
-      Parse::NodeKind::StructLiteralOrStructTypeLiteralStart);
+      Parse::NodeKind::StructLiteralStart);
 
 
   context.scope_stack().Pop();
   context.scope_stack().Pop();
   context.node_stack()
   context.node_stack()
-      .PopAndDiscardSoloNodeId<
-          Parse::NodeKind::StructLiteralOrStructTypeLiteralStart>();
+      .PopAndDiscardSoloNodeId<Parse::NodeKind::StructLiteralStart>();
   auto type_block_id = context.args_type_info_stack().Pop();
   auto type_block_id = context.args_type_info_stack().Pop();
   if (DiagnoseDuplicateNames(context, type_block_id, "struct literal")) {
   if (DiagnoseDuplicateNames(context, type_block_id, "struct literal")) {
     context.node_stack().Push(node_id, SemIR::InstId::BuiltinError);
     context.node_stack().Push(node_id, SemIR::InstId::BuiltinError);
@@ -115,14 +118,11 @@ auto HandleStructLiteral(Context& context, Parse::StructLiteralId node_id)
 auto HandleStructTypeLiteral(Context& context,
 auto HandleStructTypeLiteral(Context& context,
                              Parse::StructTypeLiteralId node_id) -> bool {
                              Parse::StructTypeLiteralId node_id) -> bool {
   auto refs_id = context.param_and_arg_refs_stack().EndAndPop(
   auto refs_id = context.param_and_arg_refs_stack().EndAndPop(
-      Parse::NodeKind::StructLiteralOrStructTypeLiteralStart);
+      Parse::NodeKind::StructTypeLiteralStart);
 
 
   context.scope_stack().Pop();
   context.scope_stack().Pop();
   context.node_stack()
   context.node_stack()
-      .PopAndDiscardSoloNodeId<
-          Parse::NodeKind::StructLiteralOrStructTypeLiteralStart>();
-  // This is only used for value literals.
-  context.args_type_info_stack().Pop();
+      .PopAndDiscardSoloNodeId<Parse::NodeKind::StructTypeLiteralStart>();
 
 
   CARBON_CHECK(refs_id != SemIR::InstBlockId::Empty)
   CARBON_CHECK(refs_id != SemIR::InstBlockId::Empty)
       << "{} is handled by StructLiteral.";
       << "{} is handled by StructLiteral.";

+ 4 - 4
toolchain/check/node_stack.h

@@ -412,8 +412,8 @@ class NodeStack {
         case Parse::NodeKind::ReturnType:
         case Parse::NodeKind::ReturnType:
         case Parse::NodeKind::ShortCircuitOperandAnd:
         case Parse::NodeKind::ShortCircuitOperandAnd:
         case Parse::NodeKind::ShortCircuitOperandOr:
         case Parse::NodeKind::ShortCircuitOperandOr:
-        case Parse::NodeKind::StructFieldValue:
-        case Parse::NodeKind::StructFieldType:
+        case Parse::NodeKind::StructField:
+        case Parse::NodeKind::StructTypeField:
           return Id::KindFor<SemIR::InstId>();
           return Id::KindFor<SemIR::InstId>();
         case Parse::NodeKind::IfCondition:
         case Parse::NodeKind::IfCondition:
         case Parse::NodeKind::IfExprIf:
         case Parse::NodeKind::IfExprIf:
@@ -445,12 +445,12 @@ class NodeStack {
         case Parse::NodeKind::InterfaceIntroducer:
         case Parse::NodeKind::InterfaceIntroducer:
         case Parse::NodeKind::LetInitializer:
         case Parse::NodeKind::LetInitializer:
         case Parse::NodeKind::LetIntroducer:
         case Parse::NodeKind::LetIntroducer:
-        case Parse::NodeKind::ParenExprStart:
         case Parse::NodeKind::QualifiedName:
         case Parse::NodeKind::QualifiedName:
         case Parse::NodeKind::ReturnedModifier:
         case Parse::NodeKind::ReturnedModifier:
         case Parse::NodeKind::ReturnStatementStart:
         case Parse::NodeKind::ReturnStatementStart:
         case Parse::NodeKind::ReturnVarModifier:
         case Parse::NodeKind::ReturnVarModifier:
-        case Parse::NodeKind::StructLiteralOrStructTypeLiteralStart:
+        case Parse::NodeKind::StructLiteralStart:
+        case Parse::NodeKind::StructTypeLiteralStart:
         case Parse::NodeKind::TupleLiteralStart:
         case Parse::NodeKind::TupleLiteralStart:
         case Parse::NodeKind::TuplePatternStart:
         case Parse::NodeKind::TuplePatternStart:
         case Parse::NodeKind::VariableInitializer:
         case Parse::NodeKind::VariableInitializer:

+ 2 - 2
toolchain/check/param_and_arg_refs_stack.h

@@ -30,7 +30,7 @@ class ParamAndArgRefsStack {
   // On a comma, pushes the most recent instruction, becoming param or arg ref.
   // On a comma, pushes the most recent instruction, becoming param or arg ref.
   // This also pops the NodeStack, meaning its top will remain start_kind.
   // This also pops the NodeStack, meaning its top will remain start_kind.
   auto ApplyComma() -> void {
   auto ApplyComma() -> void {
-    // Support expressions, parameters, and other nodes like `StructFieldValue`
+    // Support expressions, parameters, and other nodes like `StructField`
     // that produce InstIds.
     // that produce InstIds.
     stack_.AddInstId(node_stack_->Pop<SemIR::InstId>());
     stack_.AddInstId(node_stack_->Pop<SemIR::InstId>());
   }
   }
@@ -43,7 +43,7 @@ class ParamAndArgRefsStack {
   auto EndNoPop(Parse::NodeKind start_kind) -> void {
   auto EndNoPop(Parse::NodeKind start_kind) -> void {
     if (!node_stack_->PeekIs(start_kind)) {
     if (!node_stack_->PeekIs(start_kind)) {
       // Support expressions, parameters, and other nodes like
       // Support expressions, parameters, and other nodes like
-      // `StructFieldValue` that produce InstIds.
+      // `StructField` that produce InstIds.
       stack_.AddInstId(node_stack_->Pop<SemIR::InstId>());
       stack_.AddInstId(node_stack_->Pop<SemIR::InstId>());
     }
     }
   }
   }

+ 13 - 11
toolchain/parse/handle_brace_expr.cpp

@@ -10,9 +10,8 @@ auto HandleBraceExpr(Context& context) -> void {
   auto state = context.PopState();
   auto state = context.PopState();
   context.PushState(state, State::BraceExprFinishAsUnknown);
   context.PushState(state, State::BraceExprFinishAsUnknown);
 
 
-  CARBON_CHECK(context.ConsumeAndAddLeafNodeIf(
-      Lex::TokenKind::OpenCurlyBrace,
-      NodeKind::StructLiteralOrStructTypeLiteralStart));
+  CARBON_CHECK(context.ConsumeAndAddLeafNodeIf(Lex::TokenKind::OpenCurlyBrace,
+                                               NodeKind::Placeholder));
   if (!context.PositionIs(Lex::TokenKind::CloseCurlyBrace)) {
   if (!context.PositionIs(Lex::TokenKind::CloseCurlyBrace)) {
     context.PushState(State::BraceExprParamAsUnknown);
     context.PushState(State::BraceExprParamAsUnknown);
   }
   }
@@ -163,12 +162,12 @@ static auto HandleBraceExprParamFinish(Context& context, NodeKind node_kind,
 }
 }
 
 
 auto HandleBraceExprParamFinishAsType(Context& context) -> void {
 auto HandleBraceExprParamFinishAsType(Context& context) -> void {
-  HandleBraceExprParamFinish(context, NodeKind::StructFieldType,
+  HandleBraceExprParamFinish(context, NodeKind::StructTypeField,
                              State::BraceExprParamAsType);
                              State::BraceExprParamAsType);
 }
 }
 
 
 auto HandleBraceExprParamFinishAsValue(Context& context) -> void {
 auto HandleBraceExprParamFinishAsValue(Context& context) -> void {
-  HandleBraceExprParamFinish(context, NodeKind::StructFieldValue,
+  HandleBraceExprParamFinish(context, NodeKind::StructField,
                              State::BraceExprParamAsValue);
                              State::BraceExprParamAsValue);
 }
 }
 
 
@@ -178,24 +177,27 @@ auto HandleBraceExprParamFinishAsUnknown(Context& context) -> void {
 }
 }
 
 
 // Handles BraceExprFinishAs(Type|Value|Unknown).
 // Handles BraceExprFinishAs(Type|Value|Unknown).
-static auto HandleBraceExprFinish(Context& context, NodeKind node_kind)
-    -> void {
+static auto HandleBraceExprFinish(Context& context, NodeKind start_kind,
+                                  NodeKind end_kind) -> void {
   auto state = context.PopState();
   auto state = context.PopState();
 
 
-  context.AddNode(node_kind, context.Consume(), state.subtree_start,
+  context.ReplacePlaceholderNode(state.subtree_start, start_kind, state.token);
+  context.AddNode(end_kind, context.Consume(), state.subtree_start,
                   state.has_error);
                   state.has_error);
 }
 }
 
 
 auto HandleBraceExprFinishAsType(Context& context) -> void {
 auto HandleBraceExprFinishAsType(Context& context) -> void {
-  HandleBraceExprFinish(context, NodeKind::StructTypeLiteral);
+  HandleBraceExprFinish(context, NodeKind::StructTypeLiteralStart,
+                        NodeKind::StructTypeLiteral);
 }
 }
 
 
 auto HandleBraceExprFinishAsValue(Context& context) -> void {
 auto HandleBraceExprFinishAsValue(Context& context) -> void {
-  HandleBraceExprFinish(context, NodeKind::StructLiteral);
+  HandleBraceExprFinish(context, NodeKind::StructLiteralStart,
+                        NodeKind::StructLiteral);
 }
 }
 
 
 auto HandleBraceExprFinishAsUnknown(Context& context) -> void {
 auto HandleBraceExprFinishAsUnknown(Context& context) -> void {
-  HandleBraceExprFinish(context, NodeKind::StructLiteral);
+  HandleBraceExprFinishAsValue(context);
 }
 }
 
 
 }  // namespace Carbon::Parse
 }  // namespace Carbon::Parse

+ 15 - 18
toolchain/parse/node_kind.def

@@ -595,42 +595,40 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExprThen, 1, Then)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExprElse, 3, CARBON_IF_VALID(Else))
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExprElse, 3, CARBON_IF_VALID(Else))
 
 
 // Struct literals, such as `{.a = 0}`:
 // Struct literals, such as `{.a = 0}`:
-//   StructLiteralOrStructTypeLiteralStart
+//   StructLiteralStart
 //         _external_: IdentifierName or BaseName
 //         _external_: IdentifierName or BaseName
 //       StructFieldDesignator
 //       StructFieldDesignator
 //       _external_: expression
 //       _external_: expression
-//     StructFieldValue
+//     StructField
 //     StructComma
 //     StructComma
 //   _repeated_
 //   _repeated_
 // StructLiteral
 // StructLiteral
 //
 //
 // Struct type literals, such as `{.a: i32}`:
 // Struct type literals, such as `{.a: i32}`:
-//   StructLiteralOrStructTypeLiteralStart
+//   StructTypeLiteralStart
 //         _external_: IdentifierName or BaseName
 //         _external_: IdentifierName or BaseName
 //       StructFieldDesignator
 //       StructFieldDesignator
 //       _external_: type expression
 //       _external_: type expression
-//     StructFieldType
+//     StructTypeField
 //     StructComma
 //     StructComma
 //   _repeated_
 //   _repeated_
 // StructTypeLiteral
 // StructTypeLiteral
 //
 //
-// Elements (StructFieldValue and StructFieldType, respectively) and StructComma
+// Elements (StructField and StructTypeField, respectively) and StructComma
 // may repeat with StructComma as a separator.
 // may repeat with StructComma as a separator.
 //
 //
-// When a valid StructFieldType or StructFieldValue cannot be formed, elements
+// When a valid StructTypeField or StructField cannot be formed, elements
 // may be replaced by InvalidParse, which may have a preceding sibling
 // may be replaced by InvalidParse, which may have a preceding sibling
 // StructFieldDesignator if one was successfully parsed.
 // StructFieldDesignator if one was successfully parsed.
-CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructLiteralOrStructTypeLiteralStart, 0,
-                                   OpenCurlyBrace)
+CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructLiteralStart, 0, OpenCurlyBrace)
+CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructTypeLiteralStart, 0, OpenCurlyBrace)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldDesignator, 1, Period)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldDesignator, 1, Period)
-CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldValue, 2, Equal)
-CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructFieldType, 2, Colon)
+CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructField, 2, Equal)
+CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructTypeField, 2, Colon)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructComma, 0, Comma)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(StructComma, 0, Comma)
-CARBON_PARSE_NODE_KIND_BRACKET(StructLiteral,
-                               StructLiteralOrStructTypeLiteralStart,
+CARBON_PARSE_NODE_KIND_BRACKET(StructLiteral, StructLiteralStart,
                                CloseCurlyBrace)
                                CloseCurlyBrace)
-CARBON_PARSE_NODE_KIND_BRACKET(StructTypeLiteral,
-                               StructLiteralOrStructTypeLiteralStart,
+CARBON_PARSE_NODE_KIND_BRACKET(StructTypeLiteral, StructTypeLiteralStart,
                                CloseCurlyBrace)
                                CloseCurlyBrace)
 
 
 // Various modifiers. These are all a single token.
 // Various modifiers. These are all a single token.
@@ -805,15 +803,14 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseIntroducer, 0, Case)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseGuardIntroducer, 0, If)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseGuardIntroducer, 0, If)
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseGuardStart, 0,
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseGuardStart, 0,
                                    CARBON_IF_VALID(OpenParen))
                                    CARBON_IF_VALID(OpenParen))
-CARBON_PARSE_NODE_KIND_BRACKET(MatchCaseGuard,
-                               MatchCaseGuardIntroducer,
+CARBON_PARSE_NODE_KIND_BRACKET(MatchCaseGuard, MatchCaseGuardIntroducer,
                                CARBON_IF_VALID(CloseParen))
                                CARBON_IF_VALID(CloseParen))
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseEqualGreater, 0,
 CARBON_PARSE_NODE_KIND_CHILD_COUNT(MatchCaseEqualGreater, 0,
                                    CARBON_IF_VALID(EqualGreater))
                                    CARBON_IF_VALID(EqualGreater))
 CARBON_PARSE_NODE_KIND_BRACKET(MatchCaseStart, MatchCaseIntroducer,
 CARBON_PARSE_NODE_KIND_BRACKET(MatchCaseStart, MatchCaseIntroducer,
-                                   CARBON_IF_VALID(OpenCurlyBrace))
+                               CARBON_IF_VALID(OpenCurlyBrace))
 CARBON_PARSE_NODE_KIND_BRACKET(MatchCase, MatchCaseStart,
 CARBON_PARSE_NODE_KIND_BRACKET(MatchCase, MatchCaseStart,
-                                   CARBON_IF_VALID(CloseCurlyBrace))
+                               CARBON_IF_VALID(CloseCurlyBrace))
 
 
 // `default`:
 // `default`:
 //     MatchDefaultIntroducer
 //     MatchDefaultIntroducer

+ 2 - 2
toolchain/parse/testdata/class/fn_definitions.carbon

@@ -26,11 +26,11 @@ class Foo {
 // CHECK:STDOUT:           {kind: 'ReturnType', text: '->', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'ReturnType', text: '->', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 7},
 // CHECK:STDOUT:         {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 7},
 // CHECK:STDOUT:           {kind: 'ReturnStatementStart', text: 'return'},
 // CHECK:STDOUT:           {kind: 'ReturnStatementStart', text: 'return'},
-// CHECK:STDOUT:             {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:             {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:                 {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:                 {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:               {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:               {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:               {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:               {kind: 'IntLiteral', text: '0'},
-// CHECK:STDOUT:             {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:             {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:           {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'ReturnStatement', text: ';', subtree_size: 8},
 // CHECK:STDOUT:         {kind: 'ReturnStatement', text: ';', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'FunctionDefinition', text: '}', subtree_size: 16},
 // CHECK:STDOUT:       {kind: 'FunctionDefinition', text: '}', subtree_size: 16},

+ 1 - 1
toolchain/parse/testdata/for/fail_missing_cond.carbon

@@ -33,7 +33,7 @@ fn F() {
 // CHECK:STDOUT:         {kind: 'TuplePattern', text: ')', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'TuplePattern', text: ')', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
 // CHECK:STDOUT:           {kind: 'ForHeaderStart', text: 'for', has_error: yes},
 // CHECK:STDOUT:           {kind: 'ForHeaderStart', text: 'for', has_error: yes},
-// CHECK:STDOUT:             {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:             {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'ForHeader', text: 'for', has_error: yes, subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'ForHeader', text: 'for', has_error: yes, subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'CodeBlockStart', text: '}', has_error: yes},
 // CHECK:STDOUT:           {kind: 'CodeBlockStart', text: '}', has_error: yes},

+ 2 - 2
toolchain/parse/testdata/struct/fail_comma_only.carbon

@@ -14,13 +14,13 @@ var x: {,} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 11},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 11},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 3 - 3
toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon

@@ -14,18 +14,18 @@ var x: {.a: i32,,} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 9},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 9},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 16},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 16},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 3 - 3
toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon

@@ -14,18 +14,18 @@ var x: {.a = 0,,} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '0'},
-// CHECK:STDOUT:           {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: ',', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 9},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 9},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 16},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 16},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_dot_only.carbon

@@ -14,14 +14,14 @@ var x: {.} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '}', has_error: yes},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '}', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '.', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '.', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 5},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 12},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 12},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 1 - 1
toolchain/parse/testdata/struct/fail_dot_paren.carbon

@@ -14,7 +14,7 @@ var x: {.(a) = 1};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '(', has_error: yes},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '(', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},

+ 3 - 3
toolchain/parse/testdata/struct/fail_dot_string_colon.carbon

@@ -14,7 +14,7 @@ var x: {."hello": i32, .y: i32} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '"hello"', has_error: yes},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '"hello"', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:           {kind: 'IntTypeLiteral', text: 'i32'},
@@ -23,11 +23,11 @@ var x: {."hello": i32, .y: i32} = {};
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'y'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'y'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 11},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 18},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 18},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 3 - 3
toolchain/parse/testdata/struct/fail_dot_string_equals.carbon

@@ -14,7 +14,7 @@ var x: {."hello" = 0, .y = 4} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '"hello"', has_error: yes},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: '"hello"', has_error: yes},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
@@ -23,11 +23,11 @@ var x: {."hello" = 0, .y = 4} = {};
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'y'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'y'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '4'},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '4'},
-// CHECK:STDOUT:           {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 11},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 18},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 18},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 4 - 4
toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon

@@ -14,19 +14,19 @@ var x: {.a: i32 banana} = {.a = 0};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 4 - 4
toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon

@@ -14,19 +14,19 @@ var x: {.a: i32} = {.a = 0 banana};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '0'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_identifier_colon.carbon

@@ -14,12 +14,12 @@ var x: {a:} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_identifier_equals.carbon

@@ -14,12 +14,12 @@ var x: {a=} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_identifier_only.carbon

@@ -14,12 +14,12 @@ var x: {a} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'a', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_missing_type.carbon

@@ -14,7 +14,7 @@ var x: {.a:} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '}', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '}', has_error: yes},
@@ -22,7 +22,7 @@ var x: {.a:} = {};
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 13},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 13},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_missing_value.carbon

@@ -14,7 +14,7 @@ var x: {.a=} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '}', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '}', has_error: yes},
@@ -22,7 +22,7 @@ var x: {.a=} = {};
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 13},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 13},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 3 - 3
toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon

@@ -14,11 +14,11 @@ var x: {.a: i32, .b = 0} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
@@ -26,7 +26,7 @@ var x: {.a: i32, .b = 0} = {};
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 10},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', has_error: yes, subtree_size: 10},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 12},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 12},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 3 - 3
toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon

@@ -14,17 +14,17 @@ var x: {.a = 0, b: i32} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '0'},
 // CHECK:STDOUT:             {kind: 'IntLiteral', text: '0'},
-// CHECK:STDOUT:           {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'b', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'b', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 8},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 10},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 10},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 15},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 15},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 4 - 4
toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon

@@ -31,11 +31,11 @@ var x: i32 = {.a: i32, .b, .c = 1};
 // CHECK:STDOUT:         {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:         {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:           {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:         {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
@@ -51,11 +51,11 @@ var x: i32 = {.a: i32, .b, .c = 1};
 // CHECK:STDOUT:         {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:         {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:           {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:         {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:           {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:         {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},

+ 2 - 2
toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon

@@ -14,14 +14,14 @@ var x: {.a} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '.', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: '.', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 5},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 12},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 12},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/fail_type_no_designator.carbon

@@ -14,12 +14,12 @@ var x: {i32} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'i32', has_error: yes},
 // CHECK:STDOUT:           {kind: 'InvalidParse', text: 'i32', has_error: yes},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', has_error: yes, subtree_size: 3},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 5},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 10},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 2 - 2
toolchain/parse/testdata/struct/no_entries.carbon

@@ -11,11 +11,11 @@ var y: {} = {};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'y'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'y'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:         {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 2},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 9},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 9},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 4 - 4
toolchain/parse/testdata/struct/one_entry_no_comma.carbon

@@ -11,19 +11,19 @@ var z: {.n: i32} = {.n = 4};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'z'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'z'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 8},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '4'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '4'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 6},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 17},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 4 - 4
toolchain/parse/testdata/struct/one_entry_with_comma.carbon

@@ -11,20 +11,20 @@ var z: {.n: i32,} = {.n = 4,};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'z'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'z'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 7},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 9},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 9},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'n'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '4'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '4'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 7},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 7},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 19},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 19},

+ 6 - 6
toolchain/parse/testdata/struct/two_entries.carbon

@@ -11,29 +11,29 @@ var x: {.a: i32, .b: i32} = {.a = 1, .b = 2};
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:     {kind: 'FileStart', text: ''},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:       {kind: 'VariableIntroducer', text: 'var'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
 // CHECK:STDOUT:         {kind: 'IdentifierName', text: 'x'},
-// CHECK:STDOUT:           {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:           {kind: 'StructTypeLiteralStart', text: '{'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:           {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:               {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
 // CHECK:STDOUT:             {kind: 'IntTypeLiteral', text: 'i32'},
-// CHECK:STDOUT:           {kind: 'StructFieldType', text: ':', subtree_size: 4},
+// CHECK:STDOUT:           {kind: 'StructTypeField', text: ':', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 11},
 // CHECK:STDOUT:         {kind: 'StructTypeLiteral', text: '}', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'BindingPattern', text: ':', subtree_size: 13},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
 // CHECK:STDOUT:       {kind: 'VariableInitializer', text: '='},
-// CHECK:STDOUT:         {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
+// CHECK:STDOUT:         {kind: 'StructLiteralStart', text: '{'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'a'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '1'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:         {kind: 'StructComma', text: ','},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:             {kind: 'IdentifierName', text: 'b'},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '2'},
 // CHECK:STDOUT:           {kind: 'IntLiteral', text: '2'},
-// CHECK:STDOUT:         {kind: 'StructFieldValue', text: '=', subtree_size: 4},
+// CHECK:STDOUT:         {kind: 'StructField', text: '=', subtree_size: 4},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 11},
 // CHECK:STDOUT:       {kind: 'StructLiteral', text: '}', subtree_size: 11},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 27},
 // CHECK:STDOUT:     {kind: 'VariableDecl', text: ';', subtree_size: 27},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
 // CHECK:STDOUT:     {kind: 'FileEnd', text: ''},

+ 11 - 11
toolchain/parse/typed_nodes.h

@@ -821,12 +821,12 @@ struct ChoiceDefinition {
   CommaSeparatedList<Alternative, ChoiceAlternativeListCommaId> alternatives;
   CommaSeparatedList<Alternative, ChoiceAlternativeListCommaId> alternatives;
 };
 };
 
 
-// Struct literals and struct type literals
+// Struct type and value literals
 // ----------------------------------------
 // ----------------------------------------
 
 
 // `{`
 // `{`
-using StructLiteralOrStructTypeLiteralStart =
-    LeafNode<NodeKind::StructLiteralOrStructTypeLiteralStart>;
+using StructLiteralStart = LeafNode<NodeKind::StructLiteralStart>;
+using StructTypeLiteralStart = LeafNode<NodeKind::StructTypeLiteralStart>;
 // `,`
 // `,`
 using StructComma = LeafNode<NodeKind::StructComma>;
 using StructComma = LeafNode<NodeKind::StructComma>;
 
 
@@ -838,16 +838,16 @@ struct StructFieldDesignator {
 };
 };
 
 
 // `.a = 0`
 // `.a = 0`
-struct StructFieldValue {
-  static constexpr auto Kind = NodeKind::StructFieldValue.Define();
+struct StructField {
+  static constexpr auto Kind = NodeKind::StructField.Define();
 
 
   StructFieldDesignatorId designator;
   StructFieldDesignatorId designator;
   AnyExprId expr;
   AnyExprId expr;
 };
 };
 
 
 // `.a: i32`
 // `.a: i32`
-struct StructFieldType {
-  static constexpr auto Kind = NodeKind::StructFieldType.Define();
+struct StructTypeField {
+  static constexpr auto Kind = NodeKind::StructTypeField.Define();
 
 
   StructFieldDesignatorId designator;
   StructFieldDesignatorId designator;
   AnyExprId type_expr;
   AnyExprId type_expr;
@@ -858,8 +858,8 @@ struct StructLiteral {
   static constexpr auto Kind =
   static constexpr auto Kind =
       NodeKind::StructLiteral.Define(NodeCategory::Expr);
       NodeKind::StructLiteral.Define(NodeCategory::Expr);
 
 
-  StructLiteralOrStructTypeLiteralStartId introducer;
-  CommaSeparatedList<StructFieldValueId, StructCommaId> fields;
+  StructLiteralStartId start;
+  CommaSeparatedList<StructFieldId, StructCommaId> fields;
 };
 };
 
 
 // Struct type literals, such as `{.a: i32}`.
 // Struct type literals, such as `{.a: i32}`.
@@ -867,8 +867,8 @@ struct StructTypeLiteral {
   static constexpr auto Kind =
   static constexpr auto Kind =
       NodeKind::StructTypeLiteral.Define(NodeCategory::Expr);
       NodeKind::StructTypeLiteral.Define(NodeCategory::Expr);
 
 
-  StructLiteralOrStructTypeLiteralStartId introducer;
-  CommaSeparatedList<StructFieldTypeId, StructCommaId> fields;
+  StructTypeLiteralStartId start;
+  CommaSeparatedList<StructTypeFieldId, StructCommaId> fields;
 };
 };
 
 
 // `class` declarations and definitions
 // `class` declarations and definitions