Support tuple patterns outside parameter lists (#4923)

Parameter lists need substantially different treatment than tuple
patterns in other contexts, so this change splits them into separate
parse node kinds.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Geoff Romer
2025-02-20 03:17:45 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent 35f5a7f115
commit 74e1a9949f
201 changed files with 1680 additions and 860 deletions
@@ -54,7 +54,7 @@ auto HandleDeclNameAndParams(Context& context) -> void {
context.AddLeafNode(NodeKind::IdentifierNameBeforeParams, *identifier);
state.state = State::DeclNameAndParamsAfterParams;
context.PushState(state);
context.PushState(State::PatternListAsTuple);
context.PushState(State::PatternListAsExplicit);
break;
default:
@@ -77,7 +77,7 @@ auto HandleDeclNameAndParamsAfterImplicit(Context& context) -> void {
state.state = State::DeclNameAndParamsAfterParams;
context.PushState(state);
context.PushState(State::PatternListAsTuple);
context.PushState(State::PatternListAsExplicit);
}
auto HandleDeclNameAndParamsAfterParams(Context& context) -> void {