mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 22:31:11 +00:00
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:
1 parent
ec683d1ab2
commit
82f7d06855
6 files changed
+106
-4
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user