mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Split IdentifierId and StringLiteralId from StringId (#3352)
Following up on discussion yesterday regarding this split. Note, I'm expecting #3341 to do IdentifierId -> NameId in SemIR. It might be worth adding NameId creation directly to StringStore if you're content with this setup though.
This commit is contained in:
@@ -13,7 +13,7 @@ auto DeclarationNameStack::MakeEmptyNameContext() -> NameContext {
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::MakeUnqualifiedName(Parse::Node parse_node,
|
||||
StringId name_id)
|
||||
IdentifierId name_id)
|
||||
-> NameContext {
|
||||
NameContext context = MakeEmptyNameContext();
|
||||
ApplyNameQualifierTo(context, parse_node, name_id);
|
||||
@@ -86,13 +86,13 @@ auto DeclarationNameStack::AddNameToLookup(NameContext name_context,
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::ApplyNameQualifier(Parse::Node parse_node,
|
||||
StringId name_id) -> void {
|
||||
IdentifierId name_id) -> void {
|
||||
ApplyNameQualifierTo(declaration_name_stack_.back(), parse_node, name_id);
|
||||
}
|
||||
|
||||
auto DeclarationNameStack::ApplyNameQualifierTo(NameContext& name_context,
|
||||
Parse::Node parse_node,
|
||||
StringId name_id) -> void {
|
||||
IdentifierId name_id) -> void {
|
||||
if (CanResolveQualifier(name_context, parse_node)) {
|
||||
// For identifier nodes, we need to perform a lookup on the identifier.
|
||||
// This means the input instruction name_id is actually a string ID.
|
||||
|
||||
Reference in New Issue
Block a user