From 5a90f660b9a68ec802b5a192b13daee083875357 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 22 Jun 2023 16:20:06 -0700 Subject: [PATCH] Unify DeclaredName and DesignatedName as just Identifier (#2939) This is just a simplification: I think these different forms are getting in the way more than they're helping, particularly as I was looking into namespace functionality. The handling in semantics can be identical, providing a more uniform behavior. --- toolchain/parser/parse_node_kind.def | 23 ++++++------ toolchain/parser/parse_tree_test.cpp | 4 +-- ...ser_handle_declaration_name_and_params.cpp | 2 +- toolchain/parser/parser_handle_designator.cpp | 6 ++-- toolchain/parser/parser_handle_package.cpp | 2 +- toolchain/parser/parser_handle_pattern.cpp | 4 +-- .../testdata/basics/builtin_types.carbon | 6 ++-- .../basics/fail_invalid_designators.carbon | 8 ++--- .../basics/fail_paren_match_regression.carbon | 2 +- .../testdata/basics/function_call.carbon | 10 +++--- .../parser/testdata/basics/parens.carbon | 4 +-- toolchain/parser/testdata/class/basic.carbon | 4 +-- .../testdata/class/fn_definitions.carbon | 10 +++--- toolchain/parser/testdata/class/var.carbon | 4 +-- .../for/fail_colon_instead_of_in.carbon | 4 +-- .../testdata/for/fail_missing_in.carbon | 4 +-- .../testdata/for/fail_missing_var.carbon | 2 +- toolchain/parser/testdata/for/nested.carbon | 6 ++-- toolchain/parser/testdata/for/simple.carbon | 4 +-- .../testdata/function/declaration/addr.carbon | 4 +-- .../function/declaration/basic.carbon | 2 +- .../function/declaration/deduced_empty.carbon | 2 +- .../declaration/deduced_params.carbon | 6 ++-- .../fail_identifier_instead_of_sig.carbon | 2 +- .../fail_missing_deduced_close.carbon | 4 +-- .../declaration/fail_no_sig_or_semi.carbon | 2 +- ...skip_indented_newline_until_outdent.carbon | 2 +- ...ail_skip_indented_newline_with_semi.carbon | 2 +- ..._skip_indented_newline_without_semi.carbon | 2 +- .../fail_skip_to_newline_without_semi.carbon | 2 +- .../fail_skip_without_semi_to_curly.carbon | 2 +- .../fail_with_identifier_as_param.carbon | 4 +-- .../function/declaration/params.carbon | 6 ++-- .../declaration/with_return_type.carbon | 2 +- .../testdata/function/definition/basic.carbon | 2 +- .../fail_identifier_in_statements.carbon | 2 +- .../function/definition/with_params.carbon | 6 ++-- .../definition/with_return_type.carbon | 2 +- .../generics/deduced_params/empty.carbon | 4 +-- .../deduced_params/fail_no_parens.carbon | 12 +++---- .../generics/deduced_params/one.carbon | 8 ++--- .../deduced_params/one_suffix_comma.carbon | 8 ++--- .../generics/deduced_params/six.carbon | 28 +++++++-------- .../generics/deduced_params/two.carbon | 12 +++---- .../deduced_params/two_suffix_comma.carbon | 12 +++---- .../generics/generic_params/basic.carbon | 4 +-- .../generics/generic_params/template.carbon | 4 +-- .../generic_params/template_addr.carbon | 4 +-- .../testdata/generics/interface/basic.carbon | 10 +++--- .../generics/interface/declaration.carbon | 2 +- .../generics/interface/empty_body.carbon | 2 +- .../interface/fail_missing_open_curly.carbon | 4 +-- .../interface/fail_no_impl_allowed.carbon | 6 ++-- .../interface/fail_self_param_syntax.carbon | 14 ++++---- .../generics/interface/non_instance_fn.carbon | 4 +-- .../generics/interface/self_pointer.carbon | 10 +++--- .../generics/named_constraint/basic.carbon | 4 +-- .../fail_no_impl_allowed.carbon | 6 ++-- .../testdata/generics/params/empty.carbon | 4 +-- .../testdata/generics/params/one.carbon | 8 ++--- .../generics/params/one_suffix_comma.carbon | 8 ++--- .../testdata/generics/params/six.carbon | 28 +++++++-------- .../testdata/generics/params/two.carbon | 12 +++---- .../generics/params/two_suffix_comma.carbon | 12 +++---- toolchain/parser/testdata/if/basic.carbon | 2 +- toolchain/parser/testdata/if/else.carbon | 2 +- .../testdata/if/fail_else_unbraced.carbon | 2 +- .../parser/testdata/if/fail_errors.carbon | 2 +- .../parser/testdata/if/fail_unbraced.carbon | 2 +- .../testdata/if_expression/basic.carbon | 8 ++--- .../fail_condition_missing.carbon | 4 +-- .../fail_else_expr_missing.carbon | 4 +-- .../if_expression/fail_else_missing.carbon | 4 +-- .../fail_then_expr_missing.carbon | 4 +-- .../if_expression/fail_then_missing.carbon | 4 +-- .../if_expression/fail_top_level_if.carbon | 2 +- .../testdata/if_expression/precedence.carbon | 4 +-- .../testdata/operators/associative.carbon | 2 +- .../fail_infix_uneven_space_after.carbon | 2 +- .../operators/fail_invalid_infix.carbon | 6 ++-- .../operators/fail_precedence_and_or.carbon | 2 +- .../operators/fail_precedence_or_and.carbon | 2 +- .../fail_precedence_star_minus.carbon | 2 +- .../fail_precedence_star_star.carbon | 2 +- .../operators/fail_star_star_no_space.carbon | 2 +- .../testdata/operators/fail_variety.carbon | 2 +- .../testdata/operators/fixity_in_call.carbon | 2 +- .../operators/fixity_in_params.carbon | 6 ++-- .../testdata/operators/fixity_in_var.carbon | 6 ++-- .../operators/fixity_with_assign.carbon | 2 +- .../parser/testdata/operators/infix.carbon | 2 +- .../testdata/operators/infix_no_space.carbon | 2 +- .../operators/infix_with_paren_after.carbon | 2 +- .../operators/infix_with_paren_before.carbon | 2 +- .../parser/testdata/operators/postfix.carbon | 2 +- .../testdata/operators/postfix_repeat.carbon | 2 +- .../operators/postfix_space_after_op.carbon | 2 +- .../testdata/operators/precedence_not.carbon | 2 +- .../parser/testdata/operators/prefix.carbon | 4 +-- .../testdata/operators/prefix_no_space.carbon | 2 +- .../testdata/operators/prefix_repeat.carbon | 2 +- .../recover_infix_uneven_space_before.carbon | 2 +- .../operators/recover_postfix_space.carbon | 2 +- .../recover_postfix_space_before_comma.carbon | 2 +- .../recover_postfix_space_in_call.carbon | 2 +- .../recover_postfix_space_surrounding.carbon | 2 +- .../operators/recover_prefix_space.carbon | 2 +- ...ver_prefix_uneven_space_with_assign.carbon | 2 +- toolchain/parser/testdata/package/api.carbon | 2 +- .../testdata/package/api_library.carbon | 2 +- .../testdata/package/fail_extra_string.carbon | 2 +- .../package/fail_library_is_identifier.carbon | 2 +- .../testdata/package/fail_no_semi.carbon | 2 +- .../testdata/package/fail_no_type.carbon | 2 +- .../package/fail_omit_library_keyword.carbon | 2 +- toolchain/parser/testdata/package/impl.carbon | 2 +- .../testdata/package/impl_library.carbon | 2 +- toolchain/parser/testdata/return/basic.carbon | 2 +- toolchain/parser/testdata/return/expr.carbon | 2 +- .../testdata/return/fail_expr_no_semi.carbon | 2 +- .../testdata/return/fail_no_semi.carbon | 2 +- .../testdata/struct/fail_comma_only.carbon | 2 +- .../struct/fail_comma_repeat_in_type.carbon | 4 +-- .../struct/fail_comma_repeat_in_value.carbon | 4 +-- .../testdata/struct/fail_dot_only.carbon | 4 +-- .../struct/fail_dot_string_colon.carbon | 6 ++-- .../struct/fail_dot_string_equals.carbon | 6 ++-- .../struct/fail_extra_token_in_type.carbon | 6 ++-- .../struct/fail_extra_token_in_value.carbon | 6 ++-- .../struct/fail_identifier_colon.carbon | 2 +- .../struct/fail_identifier_equals.carbon | 2 +- .../struct/fail_identifier_only.carbon | 2 +- .../testdata/struct/fail_missing_type.carbon | 4 +-- .../testdata/struct/fail_missing_value.carbon | 4 +-- .../struct/fail_mix_type_and_value.carbon | 6 ++-- .../struct/fail_mix_value_and_type.carbon | 4 +-- .../struct/fail_mix_with_unknown.carbon | 16 ++++----- .../struct/fail_no_colon_or_equals.carbon | 4 +-- .../struct/fail_type_no_designator.carbon | 2 +- .../parser/testdata/struct/no_entries.carbon | 2 +- .../testdata/struct/one_entry_no_comma.carbon | 6 ++-- .../struct/one_entry_with_comma.carbon | 6 ++-- .../parser/testdata/struct/two_entries.carbon | 10 +++--- toolchain/parser/testdata/tuple/nested.carbon | 2 +- .../parser/testdata/tuple/two_entries.carbon | 2 +- .../parser/testdata/var/fail_bad_name.carbon | 2 +- .../parser/testdata/var/fail_empty.carbon | 2 +- toolchain/parser/testdata/var/var.carbon | 8 ++--- toolchain/parser/testdata/while/basic.carbon | 2 +- .../parser/testdata/while/fail_no_semi.carbon | 2 +- .../testdata/while/fail_unbraced.carbon | 2 +- toolchain/semantics/semantics_handle.cpp | 36 ++++++++----------- .../semantics/semantics_handle_function.cpp | 8 ++--- .../semantics/semantics_handle_struct.cpp | 8 ++--- .../function/call/empty_struct.carbon | 6 ++-- .../function/call/fail_param_count.carbon | 14 ++++---- .../function/call/fail_param_type.carbon | 6 ++-- .../testdata/function/call/i32.carbon | 6 ++-- .../function/call/more_param_ir.carbon | 10 +++--- .../testdata/function/call/params_one.carbon | 6 ++-- .../function/call/params_one_comma.carbon | 6 ++-- .../testdata/function/call/params_two.carbon | 8 ++--- .../function/call/params_two_comma.carbon | 8 ++--- .../fail_param_name_conflict.carbon | 8 ++--- .../function/definition/params_one.carbon | 6 ++-- .../definition/params_one_comma.carbon | 6 ++-- .../function/definition/params_two.carbon | 8 ++--- .../definition/params_two_comma.carbon | 8 ++--- .../definition/same_param_name.carbon | 8 ++--- toolchain/semantics/testdata/if/else.carbon | 6 ++-- .../semantics/testdata/if/fail_scope.carbon | 6 ++-- .../semantics/testdata/if/no_else.carbon | 6 ++-- .../testdata/if_expression/basic.carbon | 10 +++--- .../if_expression/control_flow.carbon | 6 ++-- .../testdata/if_expression/nested.carbon | 10 +++--- .../testdata/operators/unary_op.carbon | 6 ++-- .../semantics/testdata/return/struct.carbon | 8 ++--- .../testdata/struct/fail_assign_empty.carbon | 6 ++-- .../struct/fail_field_name_mismatch.carbon | 6 ++-- .../struct/fail_field_type_mismatch.carbon | 6 ++-- .../struct/fail_member_access_type.carbon | 8 ++--- .../struct/fail_non_member_access.carbon | 8 ++--- .../struct/fail_too_few_values.carbon | 8 ++--- .../testdata/struct/fail_type_assign.carbon | 8 ++--- .../testdata/struct/fail_value_as_type.carbon | 6 ++-- .../testdata/struct/member_access.carbon | 12 +++---- .../testdata/struct/one_entry.carbon | 10 +++--- .../testdata/struct/two_entries.carbon | 12 +++---- 188 files changed, 487 insertions(+), 498 deletions(-) diff --git a/toolchain/parser/parse_node_kind.def b/toolchain/parser/parse_node_kind.def index ac6b32c7c88f..edeac7710ae0 100644 --- a/toolchain/parser/parse_node_kind.def +++ b/toolchain/parser/parse_node_kind.def @@ -50,11 +50,11 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(InvalidParse, 0) CARBON_PARSE_NODE_KIND_CHILD_COUNT(EmptyDeclaration, 0) // A name. -CARBON_PARSE_NODE_KIND_CHILD_COUNT(DeclaredName, 0) +CARBON_PARSE_NODE_KIND_CHILD_COUNT(Identifier, 0) // `package`: // PackageIntroducer -// _external_: DeclaredName +// _external_: Identifier // _external_: Literal // PackageLibrary // PackageApi or PackageImpl @@ -74,7 +74,7 @@ CARBON_PARSE_NODE_KIND_BRACKET(CodeBlock, CodeBlockStart) // `fn`: // FunctionIntroducer -// DeclaredName +// Identifier // _external_: ParameterList // _external_: type expression // ReturnType @@ -106,7 +106,7 @@ CARBON_PARSE_NODE_KIND_BRACKET(ParameterList, ParameterListStart) CARBON_PARSE_NODE_KIND_BRACKET(DeducedParameterList, DeducedParameterListStart) // A pattern binding, such as `name: Type`: -// DeclaredName +// Identifier // _external_: type expression // [Generic]PatternBinding // @@ -231,10 +231,9 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(CallExpressionComma, 0) CARBON_PARSE_NODE_KIND_BRACKET(CallExpression, CallExpressionStart) // A designator expression, such as `a.b`: -// _external_: DesignatedName or lhs expression -// _external_: DesignatedName +// _external_: lhs expression +// _external_: Identifier // DesignatorExpression -CARBON_PARSE_NODE_KIND_CHILD_COUNT(DesignatedName, 0) CARBON_PARSE_NODE_KIND_CHILD_COUNT(DesignatorExpression, 2) // A literal. @@ -279,7 +278,7 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExpressionElse, 3) // Struct literals, such as `{.a = 0}`: // StructLiteralOrStructTypeLiteralStart -// _external_: DesignatedName +// _external_: Identifier // StructFieldDesignator // _external_: expression // StructFieldValue @@ -287,7 +286,7 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(IfExpressionElse, 3) // StructLiteral // // Struct type literals, such as `{.a: i32}`: -// _external_: DesignatedName +// _external_: Identifier // StructFieldDesignator // _external_: type expression // StructFieldType @@ -313,7 +312,7 @@ CARBON_PARSE_NODE_KIND_BRACKET(StructTypeLiteral, // `class`: // ClassIntroducer -// DeclaredName +// Identifier // ClassDefinitionStart // _external_: declarations // ClassDefinition @@ -328,7 +327,7 @@ CARBON_PARSE_NODE_KIND_BRACKET(ClassDeclaration, ClassIntroducer) // `interface`: // InterfaceIntroducer -// DeclaredName +// Identifier // InterfaceDefinitionStart // _external_: declarations // InterfaceDefinition @@ -343,7 +342,7 @@ CARBON_PARSE_NODE_KIND_BRACKET(InterfaceDeclaration, InterfaceIntroducer) // `constraint`: // NamedConstraintIntroducer -// DeclaredName +// Identifier // NamedConstraintDefinitionStart // _external_: declarations // NamedConstraintDefinition diff --git a/toolchain/parser/parse_tree_test.cpp b/toolchain/parser/parse_tree_test.cpp index 388d506ee59b..6c16b5e3a35d 100644 --- a/toolchain/parser/parse_tree_test.cpp +++ b/toolchain/parser/parse_tree_test.cpp @@ -57,7 +57,7 @@ TEST_F(ParseTreeTest, PrintPostorderAsYAML) { auto file = Yaml::SequenceValue{ Yaml::MappingValue{{"kind", "FunctionIntroducer"}, {"text", "fn"}}, - Yaml::MappingValue{{"kind", "DeclaredName"}, {"text", "F"}}, + Yaml::MappingValue{{"kind", "Identifier"}, {"text", "F"}}, Yaml::MappingValue{{"kind", "ParameterListStart"}, {"text", "("}}, Yaml::MappingValue{ {"kind", "ParameterList"}, {"text", ")"}, {"subtree_size", "2"}}, @@ -86,7 +86,7 @@ TEST_F(ParseTreeTest, PrintPreorderAsYAML) { Yaml::MappingValue{ {"node_index", "0"}, {"kind", "FunctionIntroducer"}, {"text", "fn"}}, Yaml::MappingValue{ - {"node_index", "1"}, {"kind", "DeclaredName"}, {"text", "F"}}, + {"node_index", "1"}, {"kind", "Identifier"}, {"text", "F"}}, Yaml::MappingValue{{"node_index", "3"}, {"kind", "ParameterList"}, {"text", ")"}, diff --git a/toolchain/parser/parser_handle_declaration_name_and_params.cpp b/toolchain/parser/parser_handle_declaration_name_and_params.cpp index e78e1f108608..c16d15e6c100 100644 --- a/toolchain/parser/parser_handle_declaration_name_and_params.cpp +++ b/toolchain/parser/parser_handle_declaration_name_and_params.cpp @@ -12,7 +12,7 @@ static auto ParserHandleDeclarationNameAndParams(ParserContext& context, auto state = context.PopState(); if (!context.ConsumeAndAddLeafNodeIf(TokenKind::Identifier, - ParseNodeKind::DeclaredName)) { + ParseNodeKind::Identifier)) { CARBON_DIAGNOSTIC(ExpectedDeclarationName, Error, "`{0}` introducer should be followed by a name.", TokenKind); diff --git a/toolchain/parser/parser_handle_designator.cpp b/toolchain/parser/parser_handle_designator.cpp index 857534405fc0..267293acee55 100644 --- a/toolchain/parser/parser_handle_designator.cpp +++ b/toolchain/parser/parser_handle_designator.cpp @@ -14,17 +14,17 @@ auto ParserHandleDesignator(ParserContext& context, bool as_struct) -> void { auto dot = context.ConsumeChecked(TokenKind::Period); if (!context.ConsumeAndAddLeafNodeIf(TokenKind::Identifier, - ParseNodeKind::DesignatedName)) { + ParseNodeKind::Identifier)) { CARBON_DIAGNOSTIC(ExpectedIdentifierAfterDot, Error, "Expected identifier after `.`."); context.emitter().Emit(*context.position(), ExpectedIdentifierAfterDot); // If we see a keyword, assume it was intended to be the designated name. // TODO: Should keywords be valid in designators? if (context.PositionKind().is_keyword()) { - context.AddLeafNode(ParseNodeKind::DesignatedName, context.Consume(), + context.AddLeafNode(ParseNodeKind::Identifier, context.Consume(), /*has_error=*/true); } else { - context.AddLeafNode(ParseNodeKind::DesignatedName, *context.position(), + context.AddLeafNode(ParseNodeKind::Identifier, *context.position(), /*has_error=*/true); // Indicate the error to the parent state so that it can avoid producing // more errors. diff --git a/toolchain/parser/parser_handle_package.cpp b/toolchain/parser/parser_handle_package.cpp index a1265069662b..295ffce15229 100644 --- a/toolchain/parser/parser_handle_package.cpp +++ b/toolchain/parser/parser_handle_package.cpp @@ -20,7 +20,7 @@ auto ParserHandlePackage(ParserContext& context) -> void { }; if (!context.ConsumeAndAddLeafNodeIf(TokenKind::Identifier, - ParseNodeKind::DeclaredName)) { + ParseNodeKind::Identifier)) { CARBON_DIAGNOSTIC(ExpectedIdentifierAfterPackage, Error, "Expected identifier after `package`."); context.emitter().Emit(*context.position(), ExpectedIdentifierAfterPackage); diff --git a/toolchain/parser/parser_handle_pattern.cpp b/toolchain/parser/parser_handle_pattern.cpp index 2252c9f487cf..52663906c893 100644 --- a/toolchain/parser/parser_handle_pattern.cpp +++ b/toolchain/parser/parser_handle_pattern.cpp @@ -49,7 +49,7 @@ static auto ParserHandlePattern(ParserContext& context, // The first item should be an identifier or, for deduced parameters, `self`. bool has_name = false; if (auto identifier = context.ConsumeIf(TokenKind::Identifier)) { - context.AddLeafNode(ParseNodeKind::DeclaredName, *identifier); + context.AddLeafNode(ParseNodeKind::Identifier, *identifier); has_name = true; } else if (pattern_kind == ParserContext::PatternKind::DeducedParameter) { if (auto self = context.ConsumeIf(TokenKind::SelfValueIdentifier)) { @@ -59,7 +59,7 @@ static auto ParserHandlePattern(ParserContext& context, } if (!has_name) { // Add a placeholder for the name. - context.AddLeafNode(ParseNodeKind::DeclaredName, *context.position(), + context.AddLeafNode(ParseNodeKind::Identifier, *context.position(), /*has_error=*/true); on_error(); return; diff --git a/toolchain/parser/testdata/basics/builtin_types.carbon b/toolchain/parser/testdata/basics/builtin_types.carbon index 5a001da66e68..5c288c70784d 100644 --- a/toolchain/parser/testdata/basics/builtin_types.carbon +++ b/toolchain/parser/testdata/basics/builtin_types.carbon @@ -5,21 +5,21 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'test_i32'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'test_i32'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 7}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'test_f64'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'test_f64'}, // CHECK:STDOUT: {kind: 'Literal', text: 'f64'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'Literal', text: '0.1'}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 7}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'test_str'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'test_str'}, // CHECK:STDOUT: {kind: 'Literal', text: 'String'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/basics/fail_invalid_designators.carbon b/toolchain/parser/testdata/basics/fail_invalid_designators.carbon index 3f6cd4146f8c..3a4b3ce7dc2b 100644 --- a/toolchain/parser/testdata/basics/fail_invalid_designators.carbon +++ b/toolchain/parser/testdata/basics/fail_invalid_designators.carbon @@ -5,20 +5,20 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'NameReference', text: 'a'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: ';', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: ';', has_error: yes}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExpressionStatement', text: ';', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'NameReference', text: 'a'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'fn', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'fn', has_error: yes}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExpressionStatement', text: ';', subtree_size: 4}, // CHECK:STDOUT: {kind: 'NameReference', text: 'a'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: '42', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '42', has_error: yes}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ExpressionStatement', text: ';', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 18}, diff --git a/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon b/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon index c67048fb1056..cc489691a267 100644 --- a/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon +++ b/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: '=', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '=', has_error: yes}, // CHECK:STDOUT: {kind: 'InvalidParse', text: '=', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: '=', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/basics/function_call.carbon b/toolchain/parser/testdata/basics/function_call.carbon index 044d71b26ec0..629c85454dd0 100644 --- a/toolchain/parser/testdata/basics/function_call.carbon +++ b/toolchain/parser/testdata/basics/function_call.carbon @@ -5,25 +5,25 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'NameReference', text: 'a'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'f'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'f'}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 5}, // CHECK:STDOUT: {kind: 'CallExpressionStart', text: '(', subtree_size: 6}, // CHECK:STDOUT: {kind: 'NameReference', text: 'c'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'd'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'd'}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, // CHECK:STDOUT: {kind: 'CallExpressionComma', text: ','}, // CHECK:STDOUT: {kind: 'ParenExpressionOrTupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'NameReference', text: 'e'}, // CHECK:STDOUT: {kind: 'ParenExpression', text: ')', subtree_size: 3}, // CHECK:STDOUT: {kind: 'CallExpression', text: ')', subtree_size: 14}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'g'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'g'}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 16}, // CHECK:STDOUT: {kind: 'CallExpressionStart', text: '(', subtree_size: 17}, // CHECK:STDOUT: {kind: 'CallExpression', text: ')', subtree_size: 18}, diff --git a/toolchain/parser/testdata/basics/parens.carbon b/toolchain/parser/testdata/basics/parens.carbon index 4b3061239f08..8144c25b58d7 100644 --- a/toolchain/parser/testdata/basics/parens.carbon +++ b/toolchain/parser/testdata/basics/parens.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/class/basic.carbon b/toolchain/parser/testdata/class/basic.carbon index 143d825cbf5a..290f0f131aba 100644 --- a/toolchain/parser/testdata/class/basic.carbon +++ b/toolchain/parser/testdata/class/basic.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Baz'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Baz'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/class/fn_definitions.carbon b/toolchain/parser/testdata/class/fn_definitions.carbon index cfba0c14e61a..705d7128f1b1 100644 --- a/toolchain/parser/testdata/class/fn_definitions.carbon +++ b/toolchain/parser/testdata/class/fn_definitions.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Make'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Make'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, @@ -16,7 +16,7 @@ // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ReturnStatementStart', text: 'return'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, @@ -24,7 +24,7 @@ // CHECK:STDOUT: {kind: 'ReturnStatement', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 16}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Baz'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Baz'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, @@ -37,7 +37,7 @@ // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 12}, // CHECK:STDOUT: {kind: 'ReturnStatementStart', text: 'return'}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'DesignatorExpression', text: '.', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ReturnStatement', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 18}, diff --git a/toolchain/parser/testdata/class/var.carbon b/toolchain/parser/testdata/class/var.carbon index 20132df60ac2..be364ab4ad51 100644 --- a/toolchain/parser/testdata/class/var.carbon +++ b/toolchain/parser/testdata/class/var.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ClassDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon b/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon index ee651e69d6ed..eb73b8852c23 100644 --- a/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon +++ b/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ForHeaderStart', text: '('}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ForIn', text: ':', has_error: yes, subtree_size: 5}, diff --git a/toolchain/parser/testdata/for/fail_missing_in.carbon b/toolchain/parser/testdata/for/fail_missing_in.carbon index d61bc4576ba0..b487249830bf 100644 --- a/toolchain/parser/testdata/for/fail_missing_in.carbon +++ b/toolchain/parser/testdata/for/fail_missing_in.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ForHeaderStart', text: '('}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ForIn', text: 'var', has_error: yes, subtree_size: 5}, diff --git a/toolchain/parser/testdata/for/fail_missing_var.carbon b/toolchain/parser/testdata/for/fail_missing_var.carbon index da5e6de8973c..1c9d9199c7e8 100644 --- a/toolchain/parser/testdata/for/fail_missing_var.carbon +++ b/toolchain/parser/testdata/for/fail_missing_var.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/for/nested.carbon b/toolchain/parser/testdata/for/nested.carbon index 7b3e1e64fc1a..1a4dfaeca424 100644 --- a/toolchain/parser/testdata/for/nested.carbon +++ b/toolchain/parser/testdata/for/nested.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ForHeaderStart', text: '('}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ForIn', text: 'in', subtree_size: 5}, @@ -20,7 +20,7 @@ // CHECK:STDOUT: {kind: 'CodeBlockStart', text: '{'}, // CHECK:STDOUT: {kind: 'ForHeaderStart', text: '('}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'z'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'z'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ForIn', text: 'in', subtree_size: 5}, diff --git a/toolchain/parser/testdata/for/simple.carbon b/toolchain/parser/testdata/for/simple.carbon index 185e972a9e7c..437a774d90a8 100644 --- a/toolchain/parser/testdata/for/simple.carbon +++ b/toolchain/parser/testdata/for/simple.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ForHeaderStart', text: '('}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ForIn', text: 'in', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/addr.carbon b/toolchain/parser/testdata/function/declaration/addr.carbon index 70feb41d505a..e64c9f03c375 100644 --- a/toolchain/parser/testdata/function/declaration/addr.carbon +++ b/toolchain/parser/testdata/function/declaration/addr.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PostfixOperator', text: '*', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 4}, diff --git a/toolchain/parser/testdata/function/declaration/basic.carbon b/toolchain/parser/testdata/function/declaration/basic.carbon index add7d387c34b..7e1c781a13a4 100644 --- a/toolchain/parser/testdata/function/declaration/basic.carbon +++ b/toolchain/parser/testdata/function/declaration/basic.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/deduced_empty.carbon b/toolchain/parser/testdata/function/declaration/deduced_empty.carbon index 491e4a9741f8..0190a17e76d8 100644 --- a/toolchain/parser/testdata/function/declaration/deduced_empty.carbon +++ b/toolchain/parser/testdata/function/declaration/deduced_empty.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, diff --git a/toolchain/parser/testdata/function/declaration/deduced_params.carbon b/toolchain/parser/testdata/function/declaration/deduced_params.carbon index a95ca6309fab..7c14c0b5264e 100644 --- a/toolchain/parser/testdata/function/declaration/deduced_params.carbon +++ b/toolchain/parser/testdata/function/declaration/deduced_params.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 9}, diff --git a/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon b/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon index 90a686964079..45148eed9172 100644 --- a/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon b/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon index b36596349f50..2027afe3299b 100644 --- a/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Div'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Div'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: '(', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '(', has_error: yes}, // CHECK:STDOUT: {kind: 'InvalidParse', text: '(', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: '(', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', has_error: yes, subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon index 151f5c225f38..8b5efde93605 100644 --- a/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon index 2ed716690574..ba0e19842deb 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon index cf5dc2a34a45..418d9a3f9066 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon index 2c9f89c82535..0886170789a7 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon index 394c3379e4cc..2e7bb086fe9f 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon index 92ab55174df6..40f35bc79af8 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon @@ -6,7 +6,7 @@ // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'EmptyDeclaration', text: 'struct', has_error: yes}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon b/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon index c76e03393099..d5aef63796a4 100644 --- a/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'bar'}, // CHECK:STDOUT: {kind: 'InvalidParse', text: ')', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: 'bar', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', has_error: yes, subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/declaration/params.carbon b/toolchain/parser/testdata/function/declaration/params.carbon index 34d24f65620c..1b0f3744c312 100644 --- a/toolchain/parser/testdata/function/declaration/params.carbon +++ b/toolchain/parser/testdata/function/declaration/params.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 9}, diff --git a/toolchain/parser/testdata/function/declaration/with_return_type.carbon b/toolchain/parser/testdata/function/declaration/with_return_type.carbon index 352b6a4231a6..6477671bcf90 100644 --- a/toolchain/parser/testdata/function/declaration/with_return_type.carbon +++ b/toolchain/parser/testdata/function/declaration/with_return_type.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'u32'}, diff --git a/toolchain/parser/testdata/function/definition/basic.carbon b/toolchain/parser/testdata/function/definition/basic.carbon index 4bb28995c751..18334926612a 100644 --- a/toolchain/parser/testdata/function/definition/basic.carbon +++ b/toolchain/parser/testdata/function/definition/basic.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon b/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon index 4d8ea53b05f4..cd683c207d07 100644 --- a/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon +++ b/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/function/definition/with_params.carbon b/toolchain/parser/testdata/function/definition/with_params.carbon index be27a6204623..76d24910ab3a 100644 --- a/toolchain/parser/testdata/function/definition/with_params.carbon +++ b/toolchain/parser/testdata/function/definition/with_params.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'bar'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i64'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'baz'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'baz'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i64'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 9}, diff --git a/toolchain/parser/testdata/function/definition/with_return_type.carbon b/toolchain/parser/testdata/function/definition/with_return_type.carbon index 256c18ec0a6f..2dc56a27c5d4 100644 --- a/toolchain/parser/testdata/function/definition/with_return_type.carbon +++ b/toolchain/parser/testdata/function/definition/with_return_type.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'f64'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/empty.carbon b/toolchain/parser/testdata/generics/deduced_params/empty.carbon index 1d9ff3a1e520..ba8456cc4ddc 100644 --- a/toolchain/parser/testdata/generics/deduced_params/empty.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/empty.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 7}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, diff --git a/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon b/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon index b3203a01132c..a4a318c8cf70 100644 --- a/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon @@ -5,27 +5,27 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', has_error: yes, subtree_size: 8}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/deduced_params/one.carbon b/toolchain/parser/testdata/generics/deduced_params/one.carbon index 0f008ce7983b..aa975eb19000 100644 --- a/toolchain/parser/testdata/generics/deduced_params/one.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/one.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, @@ -15,9 +15,9 @@ // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 10}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon b/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon index 5b251340be2e..3bc0b6c10e98 100644 --- a/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, @@ -16,9 +16,9 @@ // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 11}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, diff --git a/toolchain/parser/testdata/generics/deduced_params/six.carbon b/toolchain/parser/testdata/generics/deduced_params/six.carbon index 7234218fb60d..53cedb790a68 100644 --- a/toolchain/parser/testdata/generics/deduced_params/six.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/six.carbon @@ -5,29 +5,29 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'd'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'd'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'e'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'e'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'f'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'f'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 25}, @@ -35,29 +35,29 @@ // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 30}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'd'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'd'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'e'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'e'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'f'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'f'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 25}, diff --git a/toolchain/parser/testdata/generics/deduced_params/two.carbon b/toolchain/parser/testdata/generics/deduced_params/two.carbon index d02c5c12e66e..686f3dba3e85 100644 --- a/toolchain/parser/testdata/generics/deduced_params/two.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/two.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 9}, @@ -19,13 +19,13 @@ // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 14}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 9}, diff --git a/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon b/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon index 474ff259ac15..32a64c36a002 100644 --- a/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, @@ -20,13 +20,13 @@ // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, diff --git a/toolchain/parser/testdata/generics/generic_params/basic.carbon b/toolchain/parser/testdata/generics/generic_params/basic.carbon index e75c76a87a08..53c8d16a1612 100644 --- a/toolchain/parser/testdata/generics/generic_params/basic.carbon +++ b/toolchain/parser/testdata/generics/generic_params/basic.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'GenericPatternBinding', text: ':!', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/generic_params/template.carbon b/toolchain/parser/testdata/generics/generic_params/template.carbon index 3c40534a4b60..3536d67eeb87 100644 --- a/toolchain/parser/testdata/generics/generic_params/template.carbon +++ b/toolchain/parser/testdata/generics/generic_params/template.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'GenericPatternBinding', text: ':!', subtree_size: 3}, // CHECK:STDOUT: {kind: 'Template', text: 'template', subtree_size: 4}, diff --git a/toolchain/parser/testdata/generics/generic_params/template_addr.carbon b/toolchain/parser/testdata/generics/generic_params/template_addr.carbon index 9daa7038ac00..328a832b7e56 100644 --- a/toolchain/parser/testdata/generics/generic_params/template_addr.carbon +++ b/toolchain/parser/testdata/generics/generic_params/template_addr.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'GenericPatternBinding', text: ':!', subtree_size: 3}, // CHECK:STDOUT: {kind: 'Address', text: 'addr', subtree_size: 4}, diff --git a/toolchain/parser/testdata/generics/interface/basic.carbon b/toolchain/parser/testdata/generics/interface/basic.carbon index e829bf0bf378..49e7728634f8 100644 --- a/toolchain/parser/testdata/generics/interface/basic.carbon +++ b/toolchain/parser/testdata/generics/interface/basic.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Add'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Add'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, @@ -23,14 +23,14 @@ // CHECK:STDOUT: {kind: 'ReturnType', text: '->', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Add'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Add'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'foo'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/interface/declaration.carbon b/toolchain/parser/testdata/generics/interface/declaration.carbon index 2e18fe6c8a58..458981cb88fd 100644 --- a/toolchain/parser/testdata/generics/interface/declaration.carbon +++ b/toolchain/parser/testdata/generics/interface/declaration.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 4}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/generics/interface/empty_body.carbon b/toolchain/parser/testdata/generics/interface/empty_body.carbon index 9a4cfebafcdb..645f829c0de8 100644 --- a/toolchain/parser/testdata/generics/interface/empty_body.carbon +++ b/toolchain/parser/testdata/generics/interface/empty_body.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 4}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon b/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon index 57a361194b3c..2838ab0d4dde 100644 --- a/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon b/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon index 9eab49f8586a..9e7c65614ab8 100644 --- a/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Add'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Add'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon b/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon index 2a745620c290..8adea9a50a4e 100644 --- a/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Sub'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Sub'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'me'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'me'}, // CHECK:STDOUT: {kind: 'InvalidParse', text: 'Self', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: 'me', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, @@ -23,14 +23,14 @@ // CHECK:STDOUT: {kind: 'ReturnType', text: '->', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 15}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Mul'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Mul'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Self', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Self', has_error: yes}, // CHECK:STDOUT: {kind: 'InvalidParse', text: 'Self', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: 'Self', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', has_error: yes, subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon b/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon index 3408985eb6ce..5e7efe120e62 100644 --- a/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon +++ b/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'FooFactory'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'FooFactory'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, diff --git a/toolchain/parser/testdata/generics/interface/self_pointer.carbon b/toolchain/parser/testdata/generics/interface/self_pointer.carbon index 94322f7a9545..4fa157801732 100644 --- a/toolchain/parser/testdata/generics/interface/self_pointer.carbon +++ b/toolchain/parser/testdata/generics/interface/self_pointer.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Sub'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Sub'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, @@ -17,7 +17,7 @@ // CHECK:STDOUT: {kind: 'Address', text: 'addr', subtree_size: 5}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, @@ -25,7 +25,7 @@ // CHECK:STDOUT: {kind: 'ReturnType', text: '->', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 17}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Sub'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Sub'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'foo'}, @@ -34,7 +34,7 @@ // CHECK:STDOUT: {kind: 'Address', text: 'addr', subtree_size: 5}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 7}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/named_constraint/basic.carbon b/toolchain/parser/testdata/generics/named_constraint/basic.carbon index 1a179bf6ffbf..e7d9ccc1598f 100644 --- a/toolchain/parser/testdata/generics/named_constraint/basic.carbon +++ b/toolchain/parser/testdata/generics/named_constraint/basic.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'NamedConstraintIntroducer', text: 'constraint'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'NamedConstraintDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Baz'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Baz'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon b/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon index 8113343dcc37..571f917b5fa8 100644 --- a/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon +++ b/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'NamedConstraintIntroducer', text: 'constraint'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'NamedConstraintDefinitionStart', text: '{', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Add'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Add'}, // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['}, // CHECK:STDOUT: {kind: 'SelfValueIdentifier', text: 'self'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'SelfTypeIdentifier', text: 'Self'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/params/empty.carbon b/toolchain/parser/testdata/generics/params/empty.carbon index bf6e903d0653..34969234cb02 100644 --- a/toolchain/parser/testdata/generics/params/empty.carbon +++ b/toolchain/parser/testdata/generics/params/empty.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/params/one.carbon b/toolchain/parser/testdata/generics/params/one.carbon index ddd722182c62..8e36754b13a9 100644 --- a/toolchain/parser/testdata/generics/params/one.carbon +++ b/toolchain/parser/testdata/generics/params/one.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon b/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon index 90cc9a00b669..448e5628ba4d 100644 --- a/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon @@ -5,18 +5,18 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 6}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, diff --git a/toolchain/parser/testdata/generics/params/six.carbon b/toolchain/parser/testdata/generics/params/six.carbon index 4da99a018f43..b5510b3c549e 100644 --- a/toolchain/parser/testdata/generics/params/six.carbon +++ b/toolchain/parser/testdata/generics/params/six.carbon @@ -5,57 +5,57 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'd'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'd'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'e'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'e'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'f'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'f'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 25}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 28}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'd'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'd'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'e'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'e'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'f'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'f'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 25}, diff --git a/toolchain/parser/testdata/generics/params/two.carbon b/toolchain/parser/testdata/generics/params/two.carbon index b3fbf0a79aee..bc162e74667b 100644 --- a/toolchain/parser/testdata/generics/params/two.carbon +++ b/toolchain/parser/testdata/generics/params/two.carbon @@ -5,25 +5,25 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 9}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 12}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 9}, diff --git a/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon b/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon index cfc608bc7ad5..456cbc2c0889 100644 --- a/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon @@ -5,26 +5,26 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 10}, // CHECK:STDOUT: {kind: 'ClassDeclaration', text: ';', subtree_size: 13}, // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Bar'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, diff --git a/toolchain/parser/testdata/if/basic.carbon b/toolchain/parser/testdata/if/basic.carbon index 332f651b5525..bb8e0fb3ce36 100644 --- a/toolchain/parser/testdata/if/basic.carbon +++ b/toolchain/parser/testdata/if/basic.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if/else.carbon b/toolchain/parser/testdata/if/else.carbon index 0223a1b45277..a9bc3963d710 100644 --- a/toolchain/parser/testdata/if/else.carbon +++ b/toolchain/parser/testdata/if/else.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if/fail_else_unbraced.carbon b/toolchain/parser/testdata/if/fail_else_unbraced.carbon index 12f45b9bd0ab..48890dbcc12e 100644 --- a/toolchain/parser/testdata/if/fail_else_unbraced.carbon +++ b/toolchain/parser/testdata/if/fail_else_unbraced.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if/fail_errors.carbon b/toolchain/parser/testdata/if/fail_errors.carbon index c3ac18a457b1..1c03ccef5d88 100644 --- a/toolchain/parser/testdata/if/fail_errors.carbon +++ b/toolchain/parser/testdata/if/fail_errors.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if/fail_unbraced.carbon b/toolchain/parser/testdata/if/fail_unbraced.carbon index 7c403e41a14e..e4e5123eda32 100644 --- a/toolchain/parser/testdata/if/fail_unbraced.carbon +++ b/toolchain/parser/testdata/if/fail_unbraced.carbon @@ -6,7 +6,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if_expression/basic.carbon b/toolchain/parser/testdata/if_expression/basic.carbon index c5056c1ee66c..40f483805b74 100644 --- a/toolchain/parser/testdata/if_expression/basic.carbon +++ b/toolchain/parser/testdata/if_expression/basic.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'bool'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 13}, diff --git a/toolchain/parser/testdata/if_expression/fail_condition_missing.carbon b/toolchain/parser/testdata/if_expression/fail_condition_missing.carbon index 7197aad32a35..987ca9f03ef0 100644 --- a/toolchain/parser/testdata/if_expression/fail_condition_missing.carbon +++ b/toolchain/parser/testdata/if_expression/fail_condition_missing.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/if_expression/fail_else_expr_missing.carbon b/toolchain/parser/testdata/if_expression/fail_else_expr_missing.carbon index b87bf1b355e2..116578676f63 100644 --- a/toolchain/parser/testdata/if_expression/fail_else_expr_missing.carbon +++ b/toolchain/parser/testdata/if_expression/fail_else_expr_missing.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/if_expression/fail_else_missing.carbon b/toolchain/parser/testdata/if_expression/fail_else_missing.carbon index fe1a2fb2aedc..2da9dbb027bc 100644 --- a/toolchain/parser/testdata/if_expression/fail_else_missing.carbon +++ b/toolchain/parser/testdata/if_expression/fail_else_missing.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/if_expression/fail_then_expr_missing.carbon b/toolchain/parser/testdata/if_expression/fail_then_expr_missing.carbon index bebc9cfd3cd5..681fdcca4282 100644 --- a/toolchain/parser/testdata/if_expression/fail_then_expr_missing.carbon +++ b/toolchain/parser/testdata/if_expression/fail_then_expr_missing.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/if_expression/fail_then_missing.carbon b/toolchain/parser/testdata/if_expression/fail_then_missing.carbon index c1f4f4649992..0c392ef64ee6 100644 --- a/toolchain/parser/testdata/if_expression/fail_then_missing.carbon +++ b/toolchain/parser/testdata/if_expression/fail_then_missing.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/if_expression/fail_top_level_if.carbon b/toolchain/parser/testdata/if_expression/fail_top_level_if.carbon index 24d94280590e..ff0be5f359f0 100644 --- a/toolchain/parser/testdata/if_expression/fail_top_level_if.carbon +++ b/toolchain/parser/testdata/if_expression/fail_top_level_if.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/if_expression/precedence.carbon b/toolchain/parser/testdata/if_expression/precedence.carbon index a1cb639eff43..268b33ff505f 100644 --- a/toolchain/parser/testdata/if_expression/precedence.carbon +++ b/toolchain/parser/testdata/if_expression/precedence.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'bool'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/associative.carbon b/toolchain/parser/testdata/operators/associative.carbon index 0ed5391584ec..6343e2c71391 100644 --- a/toolchain/parser/testdata/operators/associative.carbon +++ b/toolchain/parser/testdata/operators/associative.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon b/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon index 61ca15a80608..e2c80ab1a099 100644 --- a/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon +++ b/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fail_invalid_infix.carbon b/toolchain/parser/testdata/operators/fail_invalid_infix.carbon index 20605ea9e357..c162d69272c6 100644 --- a/toolchain/parser/testdata/operators/fail_invalid_infix.carbon +++ b/toolchain/parser/testdata/operators/fail_invalid_infix.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, @@ -14,7 +14,7 @@ // CHECK:STDOUT: {kind: 'InfixOperator', text: '==', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, @@ -23,7 +23,7 @@ // CHECK:STDOUT: {kind: 'InfixOperator', text: '==', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 9}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon b/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon index dd8af727169d..9e6f8e5b8514 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon b/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon index 07f4b668a4ef..1bc4a8432346 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon b/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon index e98a79060629..5273540c96ee 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon b/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon index ccbd9cc56c80..56053a776095 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon b/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon index cacb4d968179..94731a8d885f 100644 --- a/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon +++ b/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fail_variety.carbon b/toolchain/parser/testdata/operators/fail_variety.carbon index 7d931b742093..c41221fd3051 100644 --- a/toolchain/parser/testdata/operators/fail_variety.carbon +++ b/toolchain/parser/testdata/operators/fail_variety.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/fixity_in_call.carbon b/toolchain/parser/testdata/operators/fixity_in_call.carbon index 5804f20d45c9..ff9d91ba3040 100644 --- a/toolchain/parser/testdata/operators/fixity_in_call.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_call.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/fixity_in_params.carbon b/toolchain/parser/testdata/operators/fixity_in_params.carbon index 6762a7740bb2..7ec8ef378220 100644 --- a/toolchain/parser/testdata/operators/fixity_in_params.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_params.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'p'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'p'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PostfixOperator', text: '*', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 10}, diff --git a/toolchain/parser/testdata/operators/fixity_in_var.carbon b/toolchain/parser/testdata/operators/fixity_in_var.carbon index b15d233ed6e7..c2071603fc44 100644 --- a/toolchain/parser/testdata/operators/fixity_in_var.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_var.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'q'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'q'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PostfixOperator', text: '*', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 4}, @@ -18,7 +18,7 @@ // CHECK:STDOUT: {kind: 'NameReference', text: 'p'}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 't'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 't'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'type'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/fixity_with_assign.carbon b/toolchain/parser/testdata/operators/fixity_with_assign.carbon index 1fed453a97c2..c903dfeb18d6 100644 --- a/toolchain/parser/testdata/operators/fixity_with_assign.carbon +++ b/toolchain/parser/testdata/operators/fixity_with_assign.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/infix.carbon b/toolchain/parser/testdata/operators/infix.carbon index ab320d2a9a17..43e5cad4511f 100644 --- a/toolchain/parser/testdata/operators/infix.carbon +++ b/toolchain/parser/testdata/operators/infix.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/infix_no_space.carbon b/toolchain/parser/testdata/operators/infix_no_space.carbon index 5677bd53665b..6d24a499f8de 100644 --- a/toolchain/parser/testdata/operators/infix_no_space.carbon +++ b/toolchain/parser/testdata/operators/infix_no_space.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/infix_with_paren_after.carbon b/toolchain/parser/testdata/operators/infix_with_paren_after.carbon index c6934558fd72..1b7f0e951a44 100644 --- a/toolchain/parser/testdata/operators/infix_with_paren_after.carbon +++ b/toolchain/parser/testdata/operators/infix_with_paren_after.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/infix_with_paren_before.carbon b/toolchain/parser/testdata/operators/infix_with_paren_before.carbon index a47b3e12d9e6..cf2efd7a3e5f 100644 --- a/toolchain/parser/testdata/operators/infix_with_paren_before.carbon +++ b/toolchain/parser/testdata/operators/infix_with_paren_before.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/postfix.carbon b/toolchain/parser/testdata/operators/postfix.carbon index 79fed10462ba..3cfe97a82452 100644 --- a/toolchain/parser/testdata/operators/postfix.carbon +++ b/toolchain/parser/testdata/operators/postfix.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'v'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'type'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/postfix_repeat.carbon b/toolchain/parser/testdata/operators/postfix_repeat.carbon index 127eb69e1c5b..c6e74a174517 100644 --- a/toolchain/parser/testdata/operators/postfix_repeat.carbon +++ b/toolchain/parser/testdata/operators/postfix_repeat.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/postfix_space_after_op.carbon b/toolchain/parser/testdata/operators/postfix_space_after_op.carbon index 0b18ceb8aea5..51ffb4815d85 100644 --- a/toolchain/parser/testdata/operators/postfix_space_after_op.carbon +++ b/toolchain/parser/testdata/operators/postfix_space_after_op.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'v'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'type'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/precedence_not.carbon b/toolchain/parser/testdata/operators/precedence_not.carbon index c70f0103718e..7602a37f081f 100644 --- a/toolchain/parser/testdata/operators/precedence_not.carbon +++ b/toolchain/parser/testdata/operators/precedence_not.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/prefix.carbon b/toolchain/parser/testdata/operators/prefix.carbon index da5423becdaf..9c87fa64cbcf 100644 --- a/toolchain/parser/testdata/operators/prefix.carbon +++ b/toolchain/parser/testdata/operators/prefix.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, @@ -13,7 +13,7 @@ // CHECK:STDOUT: {kind: 'PrefixOperator', text: '-', subtree_size: 2}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 8}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'Literal', text: 'bool'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/prefix_no_space.carbon b/toolchain/parser/testdata/operators/prefix_no_space.carbon index de0a62f1fb20..4aaf93362c9f 100644 --- a/toolchain/parser/testdata/operators/prefix_no_space.carbon +++ b/toolchain/parser/testdata/operators/prefix_no_space.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/prefix_repeat.carbon b/toolchain/parser/testdata/operators/prefix_repeat.carbon index b9423409bc98..b444c60e8040 100644 --- a/toolchain/parser/testdata/operators/prefix_repeat.carbon +++ b/toolchain/parser/testdata/operators/prefix_repeat.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon b/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon index 17a53b924e2e..a646a534bbc3 100644 --- a/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon +++ b/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_postfix_space.carbon b/toolchain/parser/testdata/operators/recover_postfix_space.carbon index f0d99af17a72..200e11367c20 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'v'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'type'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon index 3a0a1f1c6192..3c077851bfda 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon index ee776c252aa3..a5142325ff1e 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon index 15ef953ebfdd..571ac9ea0cde 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'v'}, // CHECK:STDOUT: {kind: 'NameReference', text: 'type'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_prefix_space.carbon b/toolchain/parser/testdata/operators/recover_prefix_space.carbon index eb065a9010d5..2f03a00aeb4a 100644 --- a/toolchain/parser/testdata/operators/recover_prefix_space.carbon +++ b/toolchain/parser/testdata/operators/recover_prefix_space.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon b/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon index 80dc9780df75..b5c36de1f912 100644 --- a/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon +++ b/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i8'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/package/api.carbon b/toolchain/parser/testdata/package/api.carbon index 878a9da91a15..d4b0e128df9d 100644 --- a/toolchain/parser/testdata/package/api.carbon +++ b/toolchain/parser/testdata/package/api.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageApi', text: 'api'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', subtree_size: 4}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/package/api_library.carbon b/toolchain/parser/testdata/package/api_library.carbon index effb97a10618..38c90e268ba5 100644 --- a/toolchain/parser/testdata/package/api_library.carbon +++ b/toolchain/parser/testdata/package/api_library.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'Literal', text: '"Shapes"'}, // CHECK:STDOUT: {kind: 'PackageLibrary', text: 'library', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PackageApi', text: 'api'}, diff --git a/toolchain/parser/testdata/package/fail_extra_string.carbon b/toolchain/parser/testdata/package/fail_extra_string.carbon index aa821d7a3fcd..b19652d3e710 100644 --- a/toolchain/parser/testdata/package/fail_extra_string.carbon +++ b/toolchain/parser/testdata/package/fail_extra_string.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Foo'}, // CHECK:STDOUT: {kind: 'Literal', text: '"bar"'}, // CHECK:STDOUT: {kind: 'PackageLibrary', text: 'library', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 5}, diff --git a/toolchain/parser/testdata/package/fail_library_is_identifier.carbon b/toolchain/parser/testdata/package/fail_library_is_identifier.carbon index af81402e82e4..9d16568833ba 100644 --- a/toolchain/parser/testdata/package/fail_library_is_identifier.carbon +++ b/toolchain/parser/testdata/package/fail_library_is_identifier.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/package/fail_no_semi.carbon b/toolchain/parser/testdata/package/fail_no_semi.carbon index e6b57461ea65..91c287e03ef9 100644 --- a/toolchain/parser/testdata/package/fail_no_semi.carbon +++ b/toolchain/parser/testdata/package/fail_no_semi.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageApi', text: 'api'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: 'package', has_error: yes, subtree_size: 4}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/package/fail_no_type.carbon b/toolchain/parser/testdata/package/fail_no_type.carbon index 767235a35d22..40a32fd4421e 100644 --- a/toolchain/parser/testdata/package/fail_no_type.carbon +++ b/toolchain/parser/testdata/package/fail_no_type.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon b/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon index 02413356a6d8..2fec41dfffab 100644 --- a/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon +++ b/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/package/impl.carbon b/toolchain/parser/testdata/package/impl.carbon index 6cefd7bd4a3b..907112caf5ad 100644 --- a/toolchain/parser/testdata/package/impl.carbon +++ b/toolchain/parser/testdata/package/impl.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'PackageImpl', text: 'impl'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', subtree_size: 4}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/package/impl_library.carbon b/toolchain/parser/testdata/package/impl_library.carbon index f4fa3f4e9aca..6302efb50411 100644 --- a/toolchain/parser/testdata/package/impl_library.carbon +++ b/toolchain/parser/testdata/package/impl_library.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'Geometry'}, // CHECK:STDOUT: {kind: 'Literal', text: '"Shapes"'}, // CHECK:STDOUT: {kind: 'PackageLibrary', text: 'library', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PackageImpl', text: 'impl'}, diff --git a/toolchain/parser/testdata/return/basic.carbon b/toolchain/parser/testdata/return/basic.carbon index 6b51d3d2c912..a43eda5d84b5 100644 --- a/toolchain/parser/testdata/return/basic.carbon +++ b/toolchain/parser/testdata/return/basic.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/return/expr.carbon b/toolchain/parser/testdata/return/expr.carbon index ccbd2bff741a..f4ab8d10d63a 100644 --- a/toolchain/parser/testdata/return/expr.carbon +++ b/toolchain/parser/testdata/return/expr.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/return/fail_expr_no_semi.carbon b/toolchain/parser/testdata/return/fail_expr_no_semi.carbon index ca2c4c32b521..911b00b0488d 100644 --- a/toolchain/parser/testdata/return/fail_expr_no_semi.carbon +++ b/toolchain/parser/testdata/return/fail_expr_no_semi.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/return/fail_no_semi.carbon b/toolchain/parser/testdata/return/fail_no_semi.carbon index 6307617f278f..7a0bf393a918 100644 --- a/toolchain/parser/testdata/return/fail_no_semi.carbon +++ b/toolchain/parser/testdata/return/fail_no_semi.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/struct/fail_comma_only.carbon b/toolchain/parser/testdata/struct/fail_comma_only.carbon index 4c31b6115fa9..425c07d0f454 100644 --- a/toolchain/parser/testdata/struct/fail_comma_only.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_only.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: ',', has_error: yes}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, diff --git a/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon b/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon index 9056c70a316e..098ce9053c7c 100644 --- a/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon b/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon index 5998eaf228ae..aba6fe2935d3 100644 --- a/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_dot_only.carbon b/toolchain/parser/testdata/struct/fail_dot_only.carbon index 6ec238f2c22b..b3b382c16422 100644 --- a/toolchain/parser/testdata/struct/fail_dot_only.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_only.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: '}', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '}', has_error: yes}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 5}, diff --git a/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon b/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon index e607f8f677a7..c7c8a4d727dc 100644 --- a/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: '"hello"', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '"hello"', has_error: yes}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: ':', has_error: yes}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon b/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon index f93e3ff47dc4..0392d9d947c4 100644 --- a/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: '"hello"', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '"hello"', has_error: yes}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '=', has_error: yes}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '4'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon b/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon index 4c2d40e4a4cd..a9d3e5042c3d 100644 --- a/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon +++ b/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, @@ -15,7 +15,7 @@ // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 8}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon b/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon index 49a7eeef77a4..5d38c731c67a 100644 --- a/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon +++ b/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, @@ -15,7 +15,7 @@ // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 8}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_identifier_colon.carbon b/toolchain/parser/testdata/struct/fail_identifier_colon.carbon index 3288ce13780c..6ea5cadf2f17 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_colon.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_colon.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: 'a', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 3}, diff --git a/toolchain/parser/testdata/struct/fail_identifier_equals.carbon b/toolchain/parser/testdata/struct/fail_identifier_equals.carbon index 53d3b9b1728e..3cd14dce6b8c 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_equals.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: 'a', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 3}, diff --git a/toolchain/parser/testdata/struct/fail_identifier_only.carbon b/toolchain/parser/testdata/struct/fail_identifier_only.carbon index 2d30f444d65d..708b6f24d21f 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_only.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_only.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: 'a', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 3}, diff --git a/toolchain/parser/testdata/struct/fail_missing_type.carbon b/toolchain/parser/testdata/struct/fail_missing_type.carbon index 0824bb95a810..99a25adaf0e2 100644 --- a/toolchain/parser/testdata/struct/fail_missing_type.carbon +++ b/toolchain/parser/testdata/struct/fail_missing_type.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InvalidParse', text: '}', has_error: yes}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: ':', has_error: yes}, diff --git a/toolchain/parser/testdata/struct/fail_missing_value.carbon b/toolchain/parser/testdata/struct/fail_missing_value.carbon index 26d22c943854..5f6f3d7cb496 100644 --- a/toolchain/parser/testdata/struct/fail_missing_value.carbon +++ b/toolchain/parser/testdata/struct/fail_missing_value.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'InvalidParse', text: '}', has_error: yes}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '=', has_error: yes}, diff --git a/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon b/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon index 4f1e05dd07b6..41da19883f4a 100644 --- a/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructTypeLiteral', text: '}', subtree_size: 10}, diff --git a/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon b/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon index 365b296e8da8..c4c31e8d45cb 100644 --- a/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon b/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon index 85993938feda..7807eb5158f0 100644 --- a/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon @@ -5,41 +5,41 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '1'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 14}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 20}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'c'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'c'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructTypeLiteral', text: '}', subtree_size: 14}, diff --git a/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon b/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon index 4442a363d107..262205ae9452 100644 --- a/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '.', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 5}, diff --git a/toolchain/parser/testdata/struct/fail_type_no_designator.carbon b/toolchain/parser/testdata/struct/fail_type_no_designator.carbon index 28f43e013f8d..908ee88f838b 100644 --- a/toolchain/parser/testdata/struct/fail_type_no_designator.carbon +++ b/toolchain/parser/testdata/struct/fail_type_no_designator.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructFieldUnknown', text: 'i32', has_error: yes}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 3}, diff --git a/toolchain/parser/testdata/struct/no_entries.carbon b/toolchain/parser/testdata/struct/no_entries.carbon index 5847e456a7b5..7ac593184111 100644 --- a/toolchain/parser/testdata/struct/no_entries.carbon +++ b/toolchain/parser/testdata/struct/no_entries.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, // CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 2}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/one_entry_no_comma.carbon b/toolchain/parser/testdata/struct/one_entry_no_comma.carbon index 02a73f6e1577..3ac92b6f2828 100644 --- a/toolchain/parser/testdata/struct/one_entry_no_comma.carbon +++ b/toolchain/parser/testdata/struct/one_entry_no_comma.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'z'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'z'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, @@ -15,7 +15,7 @@ // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 8}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '4'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/one_entry_with_comma.carbon b/toolchain/parser/testdata/struct/one_entry_with_comma.carbon index d59a5880296f..8f28946db3df 100644 --- a/toolchain/parser/testdata/struct/one_entry_with_comma.carbon +++ b/toolchain/parser/testdata/struct/one_entry_with_comma.carbon @@ -5,9 +5,9 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'z'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'z'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, @@ -16,7 +16,7 @@ // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 9}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'n'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'n'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '4'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/struct/two_entries.carbon b/toolchain/parser/testdata/struct/two_entries.carbon index 64dcf863fdf3..1d66a88f2d85 100644 --- a/toolchain/parser/testdata/struct/two_entries.carbon +++ b/toolchain/parser/testdata/struct/two_entries.carbon @@ -5,14 +5,14 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'StructFieldType', text: ':', subtree_size: 4}, @@ -20,12 +20,12 @@ // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 13}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'a'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'a'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '1'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, // CHECK:STDOUT: {kind: 'StructComma', text: ','}, -// CHECK:STDOUT: {kind: 'DesignatedName', text: 'b'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'b'}, // CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2}, // CHECK:STDOUT: {kind: 'Literal', text: '2'}, // CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4}, diff --git a/toolchain/parser/testdata/tuple/nested.carbon b/toolchain/parser/testdata/tuple/nested.carbon index 15fdbd4e4376..572c95a9235b 100644 --- a/toolchain/parser/testdata/tuple/nested.carbon +++ b/toolchain/parser/testdata/tuple/nested.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'y'}, // CHECK:STDOUT: {kind: 'ParenExpressionOrTupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'ParenExpressionOrTupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 2}, diff --git a/toolchain/parser/testdata/tuple/two_entries.carbon b/toolchain/parser/testdata/tuple/two_entries.carbon index aef4367b7e3f..466aeb7de7f7 100644 --- a/toolchain/parser/testdata/tuple/two_entries.carbon +++ b/toolchain/parser/testdata/tuple/two_entries.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'x'}, // CHECK:STDOUT: {kind: 'ParenExpressionOrTupleLiteralStart', text: '('}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, diff --git a/toolchain/parser/testdata/var/fail_bad_name.carbon b/toolchain/parser/testdata/var/fail_bad_name.carbon index 47ab7b87c40f..e03168543f91 100644 --- a/toolchain/parser/testdata/var/fail_bad_name.carbon +++ b/toolchain/parser/testdata/var/fail_bad_name.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: '*', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: '*', has_error: yes}, // CHECK:STDOUT: {kind: 'InvalidParse', text: '*', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: '*', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/var/fail_empty.carbon b/toolchain/parser/testdata/var/fail_empty.carbon index ea357390fc61..817e0d6cd97b 100644 --- a/toolchain/parser/testdata/var/fail_empty.carbon +++ b/toolchain/parser/testdata/var/fail_empty.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: ';', has_error: yes}, +// CHECK:STDOUT: {kind: 'Identifier', text: ';', has_error: yes}, // CHECK:STDOUT: {kind: 'InvalidParse', text: ';', has_error: yes}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ';', has_error: yes, subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 5}, diff --git a/toolchain/parser/testdata/var/var.carbon b/toolchain/parser/testdata/var/var.carbon index a2624811ef52..742e13b6032c 100644 --- a/toolchain/parser/testdata/var/var.carbon +++ b/toolchain/parser/testdata/var/var.carbon @@ -5,24 +5,24 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'v'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, // CHECK:STDOUT: {kind: 'Literal', text: '0'}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 7}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'w'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'w'}, // CHECK:STDOUT: {kind: 'Literal', text: 'i32'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableDeclaration', text: ';', subtree_size: 5}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 's'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 's'}, // CHECK:STDOUT: {kind: 'Literal', text: 'String'}, // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3}, // CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, diff --git a/toolchain/parser/testdata/while/basic.carbon b/toolchain/parser/testdata/while/basic.carbon index 9466e569aa31..ca485cfcc18f 100644 --- a/toolchain/parser/testdata/while/basic.carbon +++ b/toolchain/parser/testdata/while/basic.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/while/fail_no_semi.carbon b/toolchain/parser/testdata/while/fail_no_semi.carbon index 1f691b706523..092f794151ab 100644 --- a/toolchain/parser/testdata/while/fail_no_semi.carbon +++ b/toolchain/parser/testdata/while/fail_no_semi.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/parser/testdata/while/fail_unbraced.carbon b/toolchain/parser/testdata/while/fail_unbraced.carbon index 5048af1197ff..4f2fc144d74d 100644 --- a/toolchain/parser/testdata/while/fail_unbraced.carbon +++ b/toolchain/parser/testdata/while/fail_unbraced.carbon @@ -6,7 +6,7 @@ // AUTOUPDATE // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, +// CHECK:STDOUT: {kind: 'Identifier', text: 'F'}, // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('}, // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2}, // CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, diff --git a/toolchain/semantics/semantics_handle.cpp b/toolchain/semantics/semantics_handle.cpp index 2fcd6540eec0..e43d48c7eec0 100644 --- a/toolchain/semantics/semantics_handle.cpp +++ b/toolchain/semantics/semantics_handle.cpp @@ -32,13 +32,6 @@ auto SemanticsHandleContinueStatementStart(SemanticsContext& context, return context.TODO(parse_node, "HandleContinueStatementStart"); } -auto SemanticsHandleDeclaredName(SemanticsContext& context, - ParseTree::Node parse_node) -> bool { - // The parent is responsible for binding the name. - context.node_stack().Push(parse_node); - return true; -} - auto SemanticsHandleDeducedParameterList(SemanticsContext& context, ParseTree::Node parse_node) -> bool { return context.TODO(parse_node, "HandleDeducedParameterList"); @@ -50,19 +43,10 @@ auto SemanticsHandleDeducedParameterListStart(SemanticsContext& context, return context.TODO(parse_node, "HandleDeducedParameterListStart"); } -auto SemanticsHandleDesignatedName(SemanticsContext& context, - ParseTree::Node parse_node) -> bool { - auto name_str = context.parse_tree().GetNodeText(parse_node); - auto name_id = context.semantics_ir().AddString(name_str); - // The parent is responsible for binding the name. - context.node_stack().Push(parse_node, name_id); - return true; -} - auto SemanticsHandleDesignatorExpression(SemanticsContext& context, ParseTree::Node parse_node) -> bool { - auto name_id = context.node_stack().Pop( - ParseNodeKind::DesignatedName); + auto name_id = + context.node_stack().Pop(ParseNodeKind::Identifier); auto base_id = context.node_stack().Pop(); auto base = context.semantics_ir().GetNode(base_id); @@ -156,6 +140,15 @@ auto SemanticsHandleGenericPatternBinding(SemanticsContext& context, return context.TODO(parse_node, "GenericPatternBinding"); } +auto SemanticsHandleIdentifier(SemanticsContext& context, + ParseTree::Node parse_node) -> bool { + auto name_str = context.parse_tree().GetNodeText(parse_node); + auto name_id = context.semantics_ir().AddString(name_str); + // The parent is responsible for binding the name. + context.node_stack().Push(parse_node, name_id); + return true; +} + auto SemanticsHandleInfixOperator(SemanticsContext& context, ParseTree::Node parse_node) -> bool { auto rhs_id = context.node_stack().Pop(); @@ -385,10 +378,9 @@ auto SemanticsHandlePatternBinding(SemanticsContext& context, auto cast_type_id = context.ExpressionAsType(type_node, parsed_type_id); // Get the name. - auto name_node = - context.node_stack().PopForSoloParseNode(ParseNodeKind::DeclaredName); - auto name_str = context.parse_tree().GetNodeText(name_node); - auto name_id = context.semantics_ir().AddString(name_str); + auto [name_node, name_id] = + context.node_stack().PopWithParseNode( + ParseNodeKind::Identifier); // Allocate storage, linked to the name for error locations. auto storage_id = diff --git a/toolchain/semantics/semantics_handle_function.cpp b/toolchain/semantics/semantics_handle_function.cpp index 0d59ad154fe9..1d3734a3e7a1 100644 --- a/toolchain/semantics/semantics_handle_function.cpp +++ b/toolchain/semantics/semantics_handle_function.cpp @@ -34,14 +34,12 @@ auto SemanticsHandleFunctionDefinitionStart(SemanticsContext& context, } auto param_refs_id = context.node_stack().Pop( ParseNodeKind::ParameterList); - auto name_node = - context.node_stack().PopForSoloParseNode(ParseNodeKind::DeclaredName); + auto [name_node, name_id] = + context.node_stack().PopWithParseNode( + ParseNodeKind::Identifier); auto fn_node = context.node_stack().PopForSoloParseNode( ParseNodeKind::FunctionIntroducer); - auto name_str = context.parse_tree().GetNodeText(name_node); - auto name_id = context.semantics_ir().AddString(name_str); - // Create the entry block. auto outer_block = context.node_block_stack().PeekForAdd(); context.node_block_stack().Push(); diff --git a/toolchain/semantics/semantics_handle_struct.cpp b/toolchain/semantics/semantics_handle_struct.cpp index 82cbf1b7ac2c..bc6f9f738059 100644 --- a/toolchain/semantics/semantics_handle_struct.cpp +++ b/toolchain/semantics/semantics_handle_struct.cpp @@ -21,7 +21,7 @@ auto SemanticsHandleStructFieldDesignator(SemanticsContext& context, // This leaves the designated name on top because the `.` isn't interesting. CARBON_CHECK( context.parse_tree().node_kind(context.node_stack().PeekParseNode()) == - ParseNodeKind::DesignatedName); + ParseNodeKind::Identifier); return true; } @@ -33,7 +33,7 @@ auto SemanticsHandleStructFieldType(SemanticsContext& context, auto [name_node, name_id] = context.node_stack().PopWithParseNode( - ParseNodeKind::DesignatedName); + ParseNodeKind::Identifier); context.AddNode( SemanticsNode::StructTypeField::Make(name_node, cast_type_id, name_id)); @@ -50,8 +50,8 @@ auto SemanticsHandleStructFieldValue(SemanticsContext& context, ParseTree::Node parse_node) -> bool { auto [value_parse_node, value_node_id] = context.node_stack().PopWithParseNode(); - auto name_id = context.node_stack().Pop( - ParseNodeKind::DesignatedName); + auto name_id = + context.node_stack().Pop(ParseNodeKind::Identifier); // Store the name for the type. auto type_block_id = context.args_type_info_stack().PeekForAdd(); diff --git a/toolchain/semantics/testdata/function/call/empty_struct.carbon b/toolchain/semantics/testdata/function/call/empty_struct.carbon index b1804257475e..d82e0438ccdc 100644 --- a/toolchain/semantics/testdata/function/call/empty_struct.carbon +++ b/toolchain/semantics/testdata/function/call/empty_struct.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, return_type: type0, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type0, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -13,8 +13,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Echo, +// CHECK:STDOUT: a, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -25,7 +25,7 @@ // CHECK:STDOUT: {kind: StructType, arg0: block0, type: typeTypeType}, // CHECK:STDOUT: {kind: StructValue, arg0: block0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+2, type: type0}, diff --git a/toolchain/semantics/testdata/function/call/fail_param_count.carbon b/toolchain/semantics/testdata/function/call/fail_param_count.carbon index c9641dea66ab..c1a06c7e6437 100644 --- a/toolchain/semantics/testdata/function/call/fail_param_count.carbon +++ b/toolchain/semantics/testdata/function/call/fail_param_count.carbon @@ -6,8 +6,8 @@ // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ // CHECK:STDOUT: {name: str0, param_refs: block0, body: block2}, -// CHECK:STDOUT: {name: str2, param_refs: block4, body: block5}, -// CHECK:STDOUT: {name: str4, param_refs: block7, body: block8}, +// CHECK:STDOUT: {name: str1, param_refs: block4, body: block5}, +// CHECK:STDOUT: {name: str3, param_refs: block7, body: block8}, // CHECK:STDOUT: {name: str5, param_refs: block0, body: block9}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -22,10 +22,10 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ // CHECK:STDOUT: Run0, -// CHECK:STDOUT: a, // CHECK:STDOUT: Run1, -// CHECK:STDOUT: b, +// CHECK:STDOUT: a, // CHECK:STDOUT: Run2, +// CHECK:STDOUT: b, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -35,12 +35,12 @@ // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+1, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+1, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+4, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+4, type: type1}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+6, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str4, arg1: node+6, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function2}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function3}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type1}, diff --git a/toolchain/semantics/testdata/function/call/fail_param_type.carbon b/toolchain/semantics/testdata/function/call/fail_param_type.carbon index 05f87b55c615..fc6492de2907 100644 --- a/toolchain/semantics/testdata/function/call/fail_param_type.carbon +++ b/toolchain/semantics/testdata/function/call/fail_param_type.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -14,8 +14,8 @@ // CHECK:STDOUT: {mantissa: 10, exponent: -1, is_decimal: 1}, // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Run, +// CHECK:STDOUT: a, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -25,7 +25,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type2}, diff --git a/toolchain/semantics/testdata/function/call/i32.carbon b/toolchain/semantics/testdata/function/call/i32.carbon index 55a58f9782c5..524411247651 100644 --- a/toolchain/semantics/testdata/function/call/i32.carbon +++ b/toolchain/semantics/testdata/function/call/i32.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, return_type: type0, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type0, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -14,8 +14,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Echo, +// CHECK:STDOUT: a, // CHECK:STDOUT: Main, // CHECK:STDOUT: b, // CHECK:STDOUT: ] @@ -25,7 +25,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, diff --git a/toolchain/semantics/testdata/function/call/more_param_ir.carbon b/toolchain/semantics/testdata/function/call/more_param_ir.carbon index 4225e5de0583..0a2c7b391870 100644 --- a/toolchain/semantics/testdata/function/call/more_param_ir.carbon +++ b/toolchain/semantics/testdata/function/call/more_param_ir.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str3, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str4, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -19,10 +19,10 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: Foo, // CHECK:STDOUT: a, // CHECK:STDOUT: b, // CHECK:STDOUT: c, -// CHECK:STDOUT: Foo, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -31,11 +31,11 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+4, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+4, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, diff --git a/toolchain/semantics/testdata/function/call/params_one.carbon b/toolchain/semantics/testdata/function/call/params_one.carbon index 3094c285aed4..1c077afe27e7 100644 --- a/toolchain/semantics/testdata/function/call/params_one.carbon +++ b/toolchain/semantics/testdata/function/call/params_one.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -14,8 +14,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Foo, +// CHECK:STDOUT: a, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -24,7 +24,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, diff --git a/toolchain/semantics/testdata/function/call/params_one_comma.carbon b/toolchain/semantics/testdata/function/call/params_one_comma.carbon index c3923fbcc37b..1cd2f7fb1f1e 100644 --- a/toolchain/semantics/testdata/function/call/params_one_comma.carbon +++ b/toolchain/semantics/testdata/function/call/params_one_comma.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -15,8 +15,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Foo, +// CHECK:STDOUT: a, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -25,7 +25,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, diff --git a/toolchain/semantics/testdata/function/call/params_two.carbon b/toolchain/semantics/testdata/function/call/params_two.carbon index 333fba654a52..c0f55463017c 100644 --- a/toolchain/semantics/testdata/function/call/params_two.carbon +++ b/toolchain/semantics/testdata/function/call/params_two.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str2, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str3, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -15,9 +15,9 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: Foo, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: Foo, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -26,9 +26,9 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, diff --git a/toolchain/semantics/testdata/function/call/params_two_comma.carbon b/toolchain/semantics/testdata/function/call/params_two_comma.carbon index f65b74d5ad74..112fd71f50b9 100644 --- a/toolchain/semantics/testdata/function/call/params_two_comma.carbon +++ b/toolchain/semantics/testdata/function/call/params_two_comma.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str2, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str3, param_refs: block0, body: block5}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -17,9 +17,9 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: Foo, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: Foo, // CHECK:STDOUT: Main, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -28,9 +28,9 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, diff --git a/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon b/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon index b09f4457a9bb..04e108cb0d45 100644 --- a/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon +++ b/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon @@ -5,15 +5,15 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Bar, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -21,9 +21,9 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/function/definition/params_one.carbon b/toolchain/semantics/testdata/function/definition/params_one.carbon index 0ffe39d4df14..15832dfdb66a 100644 --- a/toolchain/semantics/testdata/function/definition/params_one.carbon +++ b/toolchain/semantics/testdata/function/definition/params_one.carbon @@ -5,15 +5,15 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Foo, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -21,7 +21,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/function/definition/params_one_comma.carbon b/toolchain/semantics/testdata/function/definition/params_one_comma.carbon index 88071f7e3489..c50b6c797284 100644 --- a/toolchain/semantics/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/semantics/testdata/function/definition/params_one_comma.carbon @@ -5,15 +5,15 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Foo, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -21,7 +21,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/function/definition/params_two.carbon b/toolchain/semantics/testdata/function/definition/params_two.carbon index fae5404c628e..2fa5221e39cc 100644 --- a/toolchain/semantics/testdata/function/definition/params_two.carbon +++ b/toolchain/semantics/testdata/function/definition/params_two.carbon @@ -5,16 +5,16 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str2, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: Foo, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: Foo, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -22,9 +22,9 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/function/definition/params_two_comma.carbon b/toolchain/semantics/testdata/function/definition/params_two_comma.carbon index dd8306af9458..f61da4bfb711 100644 --- a/toolchain/semantics/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/semantics/testdata/function/definition/params_two_comma.carbon @@ -5,16 +5,16 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str2, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: Foo, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: Foo, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -22,9 +22,9 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/function/definition/same_param_name.carbon b/toolchain/semantics/testdata/function/definition/same_param_name.carbon index 63c3d177d347..ffa08efc5a4f 100644 --- a/toolchain/semantics/testdata/function/definition/same_param_name.carbon +++ b/toolchain/semantics/testdata/function/definition/same_param_name.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, body: block4}, // CHECK:STDOUT: {name: str2, param_refs: block6, body: block7}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ @@ -13,8 +13,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Foo, +// CHECK:STDOUT: a, // CHECK:STDOUT: Bar, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -23,10 +23,10 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+3, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+3, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/if/else.carbon b/toolchain/semantics/testdata/if/else.carbon index 2331ce48c8c6..6b87b1810e26 100644 --- a/toolchain/semantics/testdata/if/else.carbon +++ b/toolchain/semantics/testdata/if/else.carbon @@ -8,7 +8,7 @@ // CHECK:STDOUT: {name: str0, param_refs: block0, body: block2}, // CHECK:STDOUT: {name: str1, param_refs: block0, body: block3}, // CHECK:STDOUT: {name: str2, param_refs: block0, body: block4}, -// CHECK:STDOUT: {name: str4, param_refs: block6, body: block7}, +// CHECK:STDOUT: {name: str3, param_refs: block6, body: block7}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] @@ -18,8 +18,8 @@ // CHECK:STDOUT: F, // CHECK:STDOUT: G, // CHECK:STDOUT: H, -// CHECK:STDOUT: b, // CHECK:STDOUT: If, +// CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeEmptyTupleType, @@ -30,7 +30,7 @@ // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function2}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+3, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str4, arg1: node+3, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function3}, // CHECK:STDOUT: {kind: BranchIf, arg0: block9, arg1: node+3}, // CHECK:STDOUT: {kind: Branch, arg0: block8}, diff --git a/toolchain/semantics/testdata/if/fail_scope.carbon b/toolchain/semantics/testdata/if/fail_scope.carbon index 802240319a14..9d79385ac031 100644 --- a/toolchain/semantics/testdata/if/fail_scope.carbon +++ b/toolchain/semantics/testdata/if/fail_scope.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, return_type: type1, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type1, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: 2, @@ -13,8 +13,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: b, // CHECK:STDOUT: VarScope, +// CHECK:STDOUT: b, // CHECK:STDOUT: n, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -23,7 +23,7 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: BranchIf, arg0: block6, arg1: node+0}, // CHECK:STDOUT: {kind: Branch, arg0: block5}, diff --git a/toolchain/semantics/testdata/if/no_else.carbon b/toolchain/semantics/testdata/if/no_else.carbon index bffe38e9927e..88accc1b0ac1 100644 --- a/toolchain/semantics/testdata/if/no_else.carbon +++ b/toolchain/semantics/testdata/if/no_else.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: functions: [ // CHECK:STDOUT: {name: str0, param_refs: block0, body: block2}, // CHECK:STDOUT: {name: str1, param_refs: block0, body: block3}, -// CHECK:STDOUT: {name: str3, param_refs: block5, body: block6}, +// CHECK:STDOUT: {name: str2, param_refs: block5, body: block6}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] @@ -16,8 +16,8 @@ // CHECK:STDOUT: strings: [ // CHECK:STDOUT: F, // CHECK:STDOUT: G, -// CHECK:STDOUT: b, // CHECK:STDOUT: If, +// CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeEmptyTupleType, @@ -27,7 +27,7 @@ // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function1}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function2}, // CHECK:STDOUT: {kind: BranchIf, arg0: block8, arg1: node+2}, // CHECK:STDOUT: {kind: Branch, arg0: block7}, diff --git a/toolchain/semantics/testdata/if_expression/basic.carbon b/toolchain/semantics/testdata/if_expression/basic.carbon index 28a0b60a4a09..d25ae5c8a66c 100644 --- a/toolchain/semantics/testdata/if_expression/basic.carbon +++ b/toolchain/semantics/testdata/if_expression/basic.carbon @@ -5,17 +5,17 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str3, param_refs: block2, return_type: type1, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type1, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: F, // CHECK:STDOUT: b, // CHECK:STDOUT: n, // CHECK:STDOUT: m, -// CHECK:STDOUT: F, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeBoolType, @@ -23,11 +23,11 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+4, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+4, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: BranchIf, arg0: block6, arg1: node+0}, // CHECK:STDOUT: {kind: Branch, arg0: block5}, diff --git a/toolchain/semantics/testdata/if_expression/control_flow.carbon b/toolchain/semantics/testdata/if_expression/control_flow.carbon index f80d766db11d..2dcd3353f099 100644 --- a/toolchain/semantics/testdata/if_expression/control_flow.carbon +++ b/toolchain/semantics/testdata/if_expression/control_flow.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: functions: [ // CHECK:STDOUT: {name: str0, param_refs: block0, return_type: type0, body: block2}, // CHECK:STDOUT: {name: str1, param_refs: block0, return_type: type0, body: block3}, -// CHECK:STDOUT: {name: str3, param_refs: block5, return_type: type0, body: block6}, +// CHECK:STDOUT: {name: str2, param_refs: block5, return_type: type0, body: block6}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: 1, @@ -18,8 +18,8 @@ // CHECK:STDOUT: strings: [ // CHECK:STDOUT: A, // CHECK:STDOUT: B, -// CHECK:STDOUT: b, // CHECK:STDOUT: F, +// CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -33,7 +33,7 @@ // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int1, type: type0}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+4, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+6, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+6, type: type1}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function2}, // CHECK:STDOUT: {kind: BranchIf, arg0: block8, arg1: node+6}, // CHECK:STDOUT: {kind: Branch, arg0: block7}, diff --git a/toolchain/semantics/testdata/if_expression/nested.carbon b/toolchain/semantics/testdata/if_expression/nested.carbon index f37aade769c0..56b11c5f4576 100644 --- a/toolchain/semantics/testdata/if_expression/nested.carbon +++ b/toolchain/semantics/testdata/if_expression/nested.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str3, param_refs: block2, return_type: type1, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type1, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: 1, @@ -16,10 +16,10 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: F, // CHECK:STDOUT: a, // CHECK:STDOUT: b, // CHECK:STDOUT: c, -// CHECK:STDOUT: F, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeBoolType, @@ -27,11 +27,11 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+2, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+4, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+4, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: BranchIf, arg0: block6, arg1: node+0}, // CHECK:STDOUT: {kind: Branch, arg0: block5}, diff --git a/toolchain/semantics/testdata/operators/unary_op.carbon b/toolchain/semantics/testdata/operators/unary_op.carbon index 64ea7926f4d1..e954aeafc62e 100644 --- a/toolchain/semantics/testdata/operators/unary_op.carbon +++ b/toolchain/semantics/testdata/operators/unary_op.carbon @@ -5,22 +5,22 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block2, return_type: type0, body: block4}, +// CHECK:STDOUT: {name: str0, param_refs: block2, return_type: type0, body: block4}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: b, // CHECK:STDOUT: Not, +// CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeBoolType, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: VarStorage, type: type0}, -// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+0, type: type0}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: UnaryOperatorNot, arg0: node+0, type: type0}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+3, type: type0}, diff --git a/toolchain/semantics/testdata/return/struct.carbon b/toolchain/semantics/testdata/return/struct.carbon index d1f4ad85c93d..65fac5637c49 100644 --- a/toolchain/semantics/testdata/return/struct.carbon +++ b/toolchain/semantics/testdata/return/struct.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: functions: [ -// CHECK:STDOUT: {name: str1, param_refs: block0, return_type: type1, body: block3}, +// CHECK:STDOUT: {name: str0, param_refs: block0, return_type: type1, body: block3}, // CHECK:STDOUT: ] // CHECK:STDOUT: integer_literals: [ // CHECK:STDOUT: 3, @@ -13,19 +13,19 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: Main, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, // CHECK:STDOUT: node+1, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: function0}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+3, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block5, type: type1}, // CHECK:STDOUT: {kind: ReturnExpression, arg0: node+6, type: type1}, diff --git a/toolchain/semantics/testdata/struct/fail_assign_empty.carbon b/toolchain/semantics/testdata/struct/fail_assign_empty.carbon index 1fb2cc7fa947..cc89d6534887 100644 --- a/toolchain/semantics/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/semantics/testdata/struct/fail_assign_empty.carbon @@ -11,8 +11,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -20,10 +20,10 @@ // CHECK:STDOUT: node+4, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: StructType, arg0: block0, type: typeTypeType}, // CHECK:STDOUT: {kind: StructValue, arg0: block0, type: type2}, // CHECK:STDOUT: {kind: Assign, arg0: node+2, arg1: nodeInvalidType, type: typeInvalidType}, diff --git a/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon index 059a88aa3bce..ba03644d70f7 100644 --- a/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -22,10 +22,10 @@ // CHECK:STDOUT: node+7, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, // CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+4, type: type0}, diff --git a/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon index ffdd68cf5c00..5047ffb382e7 100644 --- a/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: {mantissa: 10, exponent: -1, is_decimal: 1}, // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: b, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -23,10 +23,10 @@ // CHECK:STDOUT: node+7, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type2}, // CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type2}, // CHECK:STDOUT: {kind: StubReference, arg0: node+4, type: type2}, diff --git a/toolchain/semantics/testdata/struct/fail_member_access_type.carbon b/toolchain/semantics/testdata/struct/fail_member_access_type.carbon index 793c44dd3c45..f9fe0d8d44d6 100644 --- a/toolchain/semantics/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/semantics/testdata/struct/fail_member_access_type.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: {mantissa: 40, exponent: -1, is_decimal: 1}, // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: y, // CHECK:STDOUT: b, // CHECK:STDOUT: ] @@ -23,12 +23,12 @@ // CHECK:STDOUT: nodeIntegerType, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+4, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+2, arg1: node+7, type: type1}, diff --git a/toolchain/semantics/testdata/struct/fail_non_member_access.carbon b/toolchain/semantics/testdata/struct/fail_non_member_access.carbon index cc9aa2465c82..4bb69fa0c175 100644 --- a/toolchain/semantics/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/semantics/testdata/struct/fail_non_member_access.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: y, // CHECK:STDOUT: b, // CHECK:STDOUT: ] @@ -22,12 +22,12 @@ // CHECK:STDOUT: node+1, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+4, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+2, arg1: node+7, type: type1}, diff --git a/toolchain/semantics/testdata/struct/fail_too_few_values.carbon b/toolchain/semantics/testdata/struct/fail_too_few_values.carbon index 34453bf187d2..540986605900 100644 --- a/toolchain/semantics/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/semantics/testdata/struct/fail_too_few_values.carbon @@ -12,9 +12,9 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: x, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: x, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -22,13 +22,13 @@ // CHECK:STDOUT: node+8, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, // CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+3, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+3, type: type1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+5, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block3, type: typeTypeType}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type2}, diff --git a/toolchain/semantics/testdata/struct/fail_type_assign.carbon b/toolchain/semantics/testdata/struct/fail_type_assign.carbon index 25029a6d0332..6f48db90b8cb 100644 --- a/toolchain/semantics/testdata/struct/fail_type_assign.carbon +++ b/toolchain/semantics/testdata/struct/fail_type_assign.carbon @@ -11,19 +11,19 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, // CHECK:STDOUT: node+1, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: Assign, arg0: node+2, arg1: nodeInvalidType, type: typeInvalidType}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ diff --git a/toolchain/semantics/testdata/struct/fail_value_as_type.carbon b/toolchain/semantics/testdata/struct/fail_value_as_type.carbon index 25d60004b60c..d29de60147c6 100644 --- a/toolchain/semantics/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/semantics/testdata/struct/fail_value_as_type.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ // CHECK:STDOUT: nodeIntegerType, @@ -21,12 +21,12 @@ // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+0, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: StructValue, arg0: block3, type: type1}, // CHECK:STDOUT: {kind: VarStorage, type: typeInvalidType}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+5, type: typeInvalidType}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+5, type: typeInvalidType}, // CHECK:STDOUT: ] // CHECK:STDOUT: node_blocks: [ // CHECK:STDOUT: [ diff --git a/toolchain/semantics/testdata/struct/member_access.carbon b/toolchain/semantics/testdata/struct/member_access.carbon index 366e945f4e20..64ec348a8318 100644 --- a/toolchain/semantics/testdata/struct/member_access.carbon +++ b/toolchain/semantics/testdata/struct/member_access.carbon @@ -13,9 +13,9 @@ // CHECK:STDOUT: {mantissa: 0, exponent: -1, is_decimal: 1}, // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: x, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: x, // CHECK:STDOUT: y, // CHECK:STDOUT: z, // CHECK:STDOUT: ] @@ -25,16 +25,16 @@ // CHECK:STDOUT: node+2, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type1}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type1}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type2}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+3, type: type2}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+3, type: type2}, // CHECK:STDOUT: {kind: RealLiteral, arg0: real0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+5, type: type0}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type1}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type1}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type1}, // CHECK:STDOUT: {kind: StubReference, arg0: node+8, type: type1}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type2}, // CHECK:STDOUT: {kind: Assign, arg0: node+3, arg1: node+11, type: type2}, diff --git a/toolchain/semantics/testdata/struct/one_entry.carbon b/toolchain/semantics/testdata/struct/one_entry.carbon index fb7d42251346..88e528cfe69f 100644 --- a/toolchain/semantics/testdata/struct/one_entry.carbon +++ b/toolchain/semantics/testdata/struct/one_entry.carbon @@ -12,8 +12,8 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ -// CHECK:STDOUT: a, // CHECK:STDOUT: x, +// CHECK:STDOUT: a, // CHECK:STDOUT: y, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -21,16 +21,16 @@ // CHECK:STDOUT: node+1, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str1, arg1: node+2, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: type1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+4, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+2, arg1: node+7, type: type1}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, // CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+10, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+10, arg1: node+2, type: type1}, diff --git a/toolchain/semantics/testdata/struct/two_entries.carbon b/toolchain/semantics/testdata/struct/two_entries.carbon index dd723d1b1d6b..f8cc779c0936 100644 --- a/toolchain/semantics/testdata/struct/two_entries.carbon +++ b/toolchain/semantics/testdata/struct/two_entries.carbon @@ -13,9 +13,9 @@ // CHECK:STDOUT: real_literals: [ // CHECK:STDOUT: ] // CHECK:STDOUT: strings: [ +// CHECK:STDOUT: x, // CHECK:STDOUT: a, // CHECK:STDOUT: b, -// CHECK:STDOUT: x, // CHECK:STDOUT: y, // CHECK:STDOUT: ] // CHECK:STDOUT: types: [ @@ -23,21 +23,21 @@ // CHECK:STDOUT: node+2, // CHECK:STDOUT: ] // CHECK:STDOUT: nodes: [ -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, // CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type0}, // CHECK:STDOUT: {kind: StructType, arg0: block2, type: typeTypeType}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, -// CHECK:STDOUT: {kind: BindName, arg0: str2, arg1: node+3, type: type1}, +// CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+3, type: type1}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int0, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+5, type: type0}, // CHECK:STDOUT: {kind: IntegerLiteral, arg0: int1, type: type0}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type0}, // CHECK:STDOUT: {kind: StubReference, arg0: node+8, type: type0}, // CHECK:STDOUT: {kind: StructValue, arg0: block4, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+3, arg1: node+11, type: type1}, -// CHECK:STDOUT: {kind: StructTypeField, arg0: str0, type: type0}, // CHECK:STDOUT: {kind: StructTypeField, arg0: str1, type: type0}, +// CHECK:STDOUT: {kind: StructTypeField, arg0: str2, type: type0}, // CHECK:STDOUT: {kind: VarStorage, type: type1}, // CHECK:STDOUT: {kind: BindName, arg0: str3, arg1: node+15, type: type1}, // CHECK:STDOUT: {kind: Assign, arg0: node+15, arg1: node+3, type: type1},