diff options
author | wadeAlexC <wade.alex.c@gmail.com> | 2017-09-22 05:42:34 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-25 17:42:01 +0800 |
commit | 0099911ace631789ab8a2294710b9fd57af1c478 (patch) | |
tree | 43863cdf1d56406ef3135689b27c109e7f590152 /libsolidity | |
parent | ccb689701e6a602a44bf2941ca71c683f96907d1 (diff) | |
download | dexon-solidity-0099911ace631789ab8a2294710b9fd57af1c478.tar.gz dexon-solidity-0099911ace631789ab8a2294710b9fd57af1c478.tar.zst dexon-solidity-0099911ace631789ab8a2294710b9fd57af1c478.zip |
Better error message for unexpected trailing comma in parameter lists
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index ce8a9f01..9a8bb358 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -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)); } |