mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Switch decl_state to an arg for modifier functions (#4027)
With private modifiers, we'll want to start checking modifiers later, e.g. after a name conflict is detected (and potentially merged). I think we've agreed to be more explicit about whether the modifier functions are manipulating state, versus trying to keep the state on the stack a little longer (moving Pop to the end of these functions). Removing FileScope from the stack and renaming it to DeclIntroducerStack to better reflect the usage and behavior. The FileScope mostly reflects an approach that wasn't ultimately adopted.
This commit is contained in:
@@ -77,7 +77,7 @@ auto HandleForHeaderStart(Context& context, Parse::ForHeaderStartId node_id)
|
||||
}
|
||||
|
||||
auto HandleForIn(Context& context, Parse::ForInId node_id) -> bool {
|
||||
context.decl_state_stack().Pop(DeclState::Var);
|
||||
context.decl_introducer_state_stack().Pop(DeclIntroducerState::Var);
|
||||
return context.TODO(node_id, "HandleForIn");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user