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 ac6b32c7c88ff..edeac7710ae0b 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 388d506ee59b3..6c16b5e3a35d4 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 e78e1f108608f..c16d15e6c100d 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 857534405fc05..267293acee551 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 a1265069662b6..295ffce152294 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 2252c9f487cf4..52663906c893e 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 5a001da66e68a..5c288c70784d3 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 3f6cd4146f8cd..3a4b3ce7dc2bb 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 c67048fb10567..cc489691a2671 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 044d71b26ec0e..629c85454dd0b 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 4b3061239f08a..8144c25b58d76 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 143d825cbf5ad..290f0f131abac 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 cfba0c14e61a4..705d7128f1b13 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 20132df60ac29..be364ab4ad51b 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 ee651e69d6ed4..eb73b8852c23c 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 d61bc4576ba03..b487249830bf3 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 da5e6de8973c9..1c9d9199c7e81 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 7b3e1e64fc1ae..1a4dfaeca424d 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 185e972a9e7cb..437a774d90a86 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 70feb41d505a2..e64c9f03c3758 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 add7d387c34b8..7e1c781a13a4b 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 491e4a9741f89..0190a17e76d84 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 a95ca6309fab8..7c14c0b5264e3 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 90a686964079c..45148eed9172b 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 b36596349f50c..2027afe3299bb 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 151f5c225f382..8b5efde936050 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 2ed7166905744..ba0e19842deb9 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 cf5dc2a34a45d..418d9a3f90668 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 2c9f89c825355..0886170789a74 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 394c3379e4cc6..2e7bb086fe9f9 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 92ab55174df62..40f35bc79af8b 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 c76e033930994..d5aef63796a42 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 34d24f65620c3..1b0f3744c312e 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 352b6a4231a68..6477671bcf905 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 4bb28995c7511..18334926612a9 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 4d8ea53b05f47..cd683c207d07b 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 be27a62046238..76d24910ab3a2 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 256c18ec0a6f4..2dc56a27c5d44 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 1d9ff3a1e520b..ba8456cc4ddc5 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 b3203a01132c5..a4a318c8cf701 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 0f008ce7983b4..aa975eb190008 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 5b251340be2e4..3bc0b6c10e987 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 7234218fb60dc..53cedb790a68a 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 d02c5c12e66e2..686f3dba3e856 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 474ff259ac153..32a64c36a0022 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 e75c76a87a080..53c8d16a16129 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 3c40534a4b602..3536d67eeb872 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 9daa7038ac009..328a832b7e56f 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 e829bf0bf378c..49e7728634f85 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 2e18fe6c8a588..458981cb88fde 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 9a4cfebafcdb4..645f829c0de82 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 57a361194b3c3..2838ab0d4dde4 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 9eab49f8586ac..9e7c65614ab8b 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 2a745620c2900..8adea9a50a4ec 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 3408985eb6cec..5e7efe120e62a 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 94322f7a95451..4fa1578017326 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 1a179bf6ffbfb..e7d9ccc1598fc 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 8113343dcc375..571f917b5fa86 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 bf6e903d06533..34969234cb02e 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 ddd722182c62e..8e36754b13a9f 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 90cc9a00b6690..448e5628ba4d5 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 4da99a018f436..b5510b3c549eb 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 b3fbf0a79aeed..bc162e74667b8 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 cfc608bc7ad5c..456cbc2c08891 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 332f651b55251..bb8e0fb3ce369 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 0223a1b452778..a9bc3963d710b 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 12f45b9bd0ab2..48890dbcc12e9 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 c3ac18a457b1d..1c03ccef5d88a 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 7c403e41a14e7..e4e5123eda32a 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 c5056c1ee66cf..40f483805b74c 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 7197aad32a35d..987ca9f03ef01 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 b87bf1b355e29..116578676f632 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 fe1a2fb2aedca..2da9dbb027bc9 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 bebc9cfd3cd58..681fdcca42822 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 c1f4f4649992d..0c392ef64ee65 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 24d94280590e2..ff0be5f359f0d 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 a1cb639eff43e..268b33ff505fd 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 0ed5391584ecf..6343e2c713915 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 61ca15a806084..e2c80ab1a0996 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 20605ea9e357e..c162d69272c6a 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 dd8af727169d8..9e6f8e5b85143 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 07f4b668a4ef1..1bc4a84323466 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 e98a79060629d..5273540c96ee6 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 ccbd9cc56c809..56053a7760957 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 cacb4d968179b..94731a8d885f2 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 7d931b742093c..c41221fd3051c 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 5804f20d45c9d..ff9d91ba30400 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 6762a7740bb23..7ec8ef3782204 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 b15d233ed6e73..c2071603fc44f 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 1fed453a97c29..c903dfeb18d6e 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 ab320d2a9a17b..43e5cad4511f4 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 5677bd53665bd..6d24a499f8deb 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 c6934558fd729..1b7f0e951a44c 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 a47b3e12d9e6d..cf2efd7a3e5fd 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 79fed10462bae..3cfe97a824522 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 127eb69e1c5b0..c6e74a1745178 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 0b18ceb8aea5c..51ffb4815d856 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 c70f0103718e9..7602a37f081f2 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 da5423becdaf7..9c87fa64cbcf6 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 de0a62f1fb204..4aaf93362c9f0 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 b9423409bc989..b444c60e8040f 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 17a53b924e2ea..a646a534bbc38 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 f0d99af17a729..200e11367c205 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 3a0a1f1c6192f..3c077851bfda9 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 ee776c252aa3e..a5142325ff1ed 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 15ef953ebfdd2..571ac9ea0cde6 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 eb065a9010d52..2f03a00aeb4af 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 80dc9780df75d..b5c36de1f9124 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 878a9da91a157..d4b0e128df9da 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 effb97a106184..38c90e268ba58 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 aa821d7a3fcd8..b19652d3e7101 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 af81402e82e41..9d16568833ba4 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 e6b57461ea65a..91c287e03ef9a 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 767235a35d224..40a32fd4421e2 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 02413356a6d84..2fec41dfffab6 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 6cefd7bd4a3ba..907112caf5ade 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 f4fa3f4e9acaf..6302efb504111 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 6b51d3d2c912a..a43eda5d84b5c 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 ccbd2bff741a8..f4ab8d10d63a3 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 ca2c4c32b5213..911b00b0488d1 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 6307617f278f2..7a0bf393a9184 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 4c31b6115fa9c..425c07d0f4545 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 9056c70a316ec..098ce9053c7cf 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 5998eaf228aed..aba6fe2935d3f 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 6ec238f2c22bf..b3b382c164223 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 e607f8f677a7d..c7c8a4d727dcf 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 f93e3ff47dc4f..0392d9d947c43 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 4c2d40e4a4cd4..a9d3e5042c3d3 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 49a7eeef77a49..5d38c731c67a6 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 3288ce13780c5..6ea5cadf2f175 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 53d3b9b1728ed..3cd14dce6b8c5 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 2d30f444d65d2..708b6f24d21f1 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 0824bb95a8103..99a25adaf0e2a 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 26d22c9438545..5f6f3d7cb4961 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 4f1e05dd07b69..41da19883f4a5 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 365b296e8da8e..c4c31e8d45cb0 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 85993938feda7..7807eb5158f07 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 4442a363d1078..262205ae9452a 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 28f43e013f8d2..908ee88f838b8 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 5847e456a7b56..7ac593184111c 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 02a73f6e15774..3ac92b6f28280 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 d59a5880296fc..8f28946db3dfe 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 64dcf863fdf36..1d66a88f2d853 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 15fdbd4e4376e..572c95a9235ba 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 aef4367b7e3fe..466aeb7de7f7b 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 47ab7b87c40f2..e03168543f917 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 ea357390fc61e..817e0d6cd97bb 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 a2624811ef52f..742e13b6032c8 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 9466e569aa311..ca485cfcc18f1 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 1f691b706523e..092f794151abb 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 5048af1197ff2..4f2fc144d74d4 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 2fcd6540eec02..e43d48c7eec0c 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 0d59ad154fe93..1d3734a3e7a10 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 82cbf1b7ac2c1..bc6f9f738059d 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 b1804257475ee..d82e0438ccdc0 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 c9641dea66abe..c1a06c7e6437c 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 05f87b55c615e..fc6492de29072 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 55a58f9782c50..524411247651d 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 4225e5de0583c..0a2c7b3918700 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 3094c285aed41..1c077afe27e7b 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 c3923fbcc37b5..1cd2f7fb1f1e9 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 333fba654a52a..c0f55463017cf 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 f65b74d5ad745..112fd71f50b91 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 b09f4457a9bb8..04e108cb0d457 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 0ffe39d4df14c..15832dfdb66a9 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 88071f7e3489c..c50b6c7972846 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 fae5404c628e5..2fa5221e39cc8 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 dd8306af9458b..f61da4bfb7117 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 63c3d177d3471..ffa08efc5a4fc 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 2331ce48c8c66..6b87b1810e26d 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 802240319a149..9d79385ac031a 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 bffe38e9927eb..88accc1b0ac1d 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 28a0b60a4a098..d25ae5c8a66ca 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 f80d766db11df..2dcd3353f0992 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 f37aade769c0d..56b11c5f45765 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 64ea7926f4d1a..e954aeafc62e4 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 d1f4ad85c93d0..65fac5637c496 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 1fb2cc7fa947f..cc89d65348870 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 059a88aa3bce9..ba03644d70f79 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 ffdd68cf5c007..5047ffb382e76 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 793c44dd3c45f..f9fe0d8d44d60 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 cc9aa2465c82d..4bb69fa0c175e 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 34453bf187d2e..540986605900c 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 25029a6d03325..6f48db90b8cb8 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 25d60004b60cc..d29de60147c64 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 366e945f4e20e..64ec348a83187 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 fb7d422513463..88e528cfe69ff 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 dd723d1b1d6b7..f8cc779c09360 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},