Factor the scope stack and lexical lookups out of Check::Context. (#3688)

This commit is contained in:
Richard Smith
2024-02-06 00:59:52 +00:00
committed by GitHub
parent 524902b540
commit fdfb1fb5ef
17 changed files with 416 additions and 289 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ auto HandleInterfaceDefinitionStart(
}
// Enter the interface scope.
context.PushScope(interface_decl_id, interface_info.scope_id);
context.scope_stack().Push(interface_decl_id, interface_info.scope_id);
// TODO: Introduce `Self`.
@@ -152,7 +152,7 @@ auto HandleInterfaceDefinition(Context& context,
auto interface_id =
context.node_stack().Pop<Parse::NodeKind::InterfaceDefinitionStart>();
context.inst_block_stack().Pop();
context.PopScope();
context.scope_stack().Pop();
context.decl_name_stack().PopScope();
// The interface type is now fully defined.