mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Better error message for unexpected trailing comma in parameter lists
This commit is contained in:
committed by
Alex Beregszaszi
parent
ccb689701e
commit
0099911ace
@@ -828,6 +828,8 @@ ASTPointer<ParameterList> Parser::parseParameterList(
|
||||
parameters.push_back(parseVariableDeclaration(options));
|
||||
while (m_scanner->currentToken() != Token::RParen)
|
||||
{
|
||||
if (m_scanner->currentToken() == Token::Comma && m_scanner->peekNextToken() == Token::RParen)
|
||||
fatalParserError("Unexpected trailing comma in parameter list.");
|
||||
expectToken(Token::Comma);
|
||||
parameters.push_back(parseVariableDeclaration(options));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user