Fix function parameter parsing past 2 params. (#2542)

The comment on FunctionParameterFinish is actually correct (`1. FunctionParameter`), just a typo in the implementation. It specifically failed parsing at the comma after the 2nd param, regardless of whether there were more params.
This commit is contained in:
Jon Ross-Perkins
2023-01-23 13:28:34 -08:00
committed by GitHub
parent ec683d1ab2
commit 82f7d06855
6 changed files with 106 additions and 4 deletions
+1 -1
View File
@@ -1090,7 +1090,7 @@ auto Parser::HandleFunctionParameterFinishState() -> void {
if (ConsumeListToken(ParseNodeKind::ParameterListComma, TokenKind::CloseParen,
state.has_error) == ListTokenKind::Comma) {
PushState(ParserState::PatternAsFunctionParameter);
PushState(ParserState::FunctionParameter);
}
}