mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename Name -> IdentifierName given that we have several other kinds of parse nodes that represent names. (#3453)
Factor out common checking handling for the different kinds of unqualified names
This commit is contained in:
@@ -17,11 +17,11 @@ static auto HandleDeclNameAndParams(Context& context, State after_name)
|
||||
context.PushState(state);
|
||||
|
||||
if (context.PositionIs(Lex::TokenKind::Period)) {
|
||||
context.AddLeafNode(NodeKind::Name, *identifier);
|
||||
context.AddLeafNode(NodeKind::IdentifierName, *identifier);
|
||||
state.state = State::PeriodAsDecl;
|
||||
context.PushState(state);
|
||||
} else {
|
||||
context.AddLeafNode(NodeKind::Name, *identifier);
|
||||
context.AddLeafNode(NodeKind::IdentifierName, *identifier);
|
||||
}
|
||||
} else {
|
||||
CARBON_DIAGNOSTIC(ExpectedDeclName, Error,
|
||||
|
||||
Reference in New Issue
Block a user