Add PushState overload to combine Parse::State change with StateStackEntry (#3485)

Shortens a common `PushState` pattern
This commit is contained in:
josh11b authored and GitHub committed 2023-12-08 23:58:30 +00:00
1 parent 6e65a30b5d
commit b7d129b88c
17 files changed
+47 -87

No files matched your search

+1 -2
View File
@@ -85,8 +85,7 @@ static auto ApplyIntroducer(Context& context, Context::StateStackEntry state,
context.ReplacePlaceholderNode(state.subtree_start, introducer_kind,
context.Consume());
// Reuse state here to retain its `subtree_start`.
state.state = next_state;
context.PushState(state);
context.PushState(state, next_state);
}
// Handles `base` as a declaration.