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
@@ -34,9 +34,9 @@ auto HandleLetDecl(Context& context, Parse::LetDeclId parse_node) -> bool {
// TODO: For a qualified `let` declaration, this should use the target scope
// of the name introduced in the declaration. See #2590.
CheckAccessModifiersOnDecl(context, Lex::TokenKind::Let,
context.current_scope_id());
context.scope_stack().PeekNameScopeId());
RequireDefaultFinalOnlyInInterfaces(context, Lex::TokenKind::Let,
context.current_scope_id());
context.scope_stack().PeekNameScopeId());
LimitModifiersOnDecl(
context, KeywordModifierSet::Access | KeywordModifierSet::Interface,
Lex::TokenKind::Let);