mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:11:06 +01:00
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.
This commit is contained in:
@@ -34,14 +34,12 @@ auto SemanticsHandleFunctionDefinitionStart(SemanticsContext& context,
|
||||
}
|
||||
auto param_refs_id = context.node_stack().Pop<SemanticsNodeBlockId>(
|
||||
ParseNodeKind::ParameterList);
|
||||
auto name_node =
|
||||
context.node_stack().PopForSoloParseNode(ParseNodeKind::DeclaredName);
|
||||
auto [name_node, name_id] =
|
||||
context.node_stack().PopWithParseNode<SemanticsStringId>(
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user