Rename StateStackEntry to State (#5256)

Also clean up `State` -> `StateKind` in the toolchain docs, which was
missed in #5249.
This commit is contained in:
Geoff Romer
2025-04-07 18:58:41 +00:00
committed by GitHub
parent a45dc42d82
commit 87f0e9723f
10 changed files with 45 additions and 53 deletions
+4 -5
View File
@@ -68,8 +68,8 @@ auto Context::ConsumeAndAddOpenParen(Lex::TokenIndex default_token,
}
auto Context::ConsumeAndAddCloseSymbol(Lex::TokenIndex expected_open,
StateStackEntry state,
NodeKind close_kind) -> void {
State state, NodeKind close_kind)
-> void {
Lex::TokenKind open_token_kind = tokens().GetKind(expected_open);
if (!open_token_kind.is_opening_symbol()) {
@@ -346,8 +346,7 @@ auto Context::ConsumeListToken(NodeKind comma_kind, Lex::TokenKind close_kind,
}
}
auto Context::AddNodeExpectingDeclSemi(StateStackEntry state,
NodeKind node_kind,
auto Context::AddNodeExpectingDeclSemi(State state, NodeKind node_kind,
Lex::TokenKind decl_kind,
bool is_def_allowed) -> void {
// TODO: This could better handle things like:
@@ -373,7 +372,7 @@ auto Context::AddNodeExpectingDeclSemi(StateStackEntry state,
}
}
auto Context::RecoverFromDeclError(StateStackEntry state, NodeKind node_kind,
auto Context::RecoverFromDeclError(State state, NodeKind node_kind,
bool skip_past_likely_end) -> void {
auto token = state.token;
if (skip_past_likely_end) {