mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 11:05:07 +01:00
Factor the scope stack and lexical lookups out of Check::Context. (#3688)
This commit is contained in:
@@ -9,13 +9,13 @@ namespace Carbon::Check {
|
||||
auto HandleCodeBlockStart(Context& context, Parse::CodeBlockStartId parse_node)
|
||||
-> bool {
|
||||
context.node_stack().Push(parse_node);
|
||||
context.PushScope();
|
||||
context.scope_stack().Push();
|
||||
return true;
|
||||
}
|
||||
|
||||
auto HandleCodeBlock(Context& context, Parse::CodeBlockId /*parse_node*/)
|
||||
-> bool {
|
||||
context.PopScope();
|
||||
context.scope_stack().Pop();
|
||||
context.node_stack()
|
||||
.PopAndDiscardSoloParseNode<Parse::NodeKind::CodeBlockStart>();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user