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
+1 -1
View File
@@ -85,7 +85,7 @@ auto HandleVariableDecl(Context& context, Parse::VariableDeclId parse_node)
// TODO: For a qualified `var` declaration, this should use the target scope
// of the name introduced in the declaration. See #2590.
CheckAccessModifiersOnDecl(context, Lex::TokenKind::Var,
context.current_scope_id());
context.scope_stack().PeekNameScopeId());
LimitModifiersOnDecl(context, KeywordModifierSet::Access,
Lex::TokenKind::Var);
auto modifiers = context.decl_state_stack().innermost().modifier_set;