diff options
author | Federico Bond <federicobond@gmail.com> | 2017-08-09 05:58:06 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-12 00:28:48 +0800 |
commit | a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c (patch) | |
tree | 785f44a497e3033e2163bd751f7660478a9f47bc /libsolidity | |
parent | 5b26e2bcee5f0cf3243fdcda53b47739f10158bb (diff) | |
download | dexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.tar.gz dexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.tar.zst dexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.zip |
Enforce commas in tuple syntax
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index a6d6e025..066e3a29 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1300,10 +1300,11 @@ ASTPointer<Expression> Parser::parsePrimaryExpression() parserError("Expected expression (inline array elements cannot be omitted)."); else components.push_back(ASTPointer<Expression>()); + if (m_scanner->currentToken() == oppositeToken) break; - else if (m_scanner->currentToken() == Token::Comma) - m_scanner->next(); + + expectToken(Token::Comma); } nodeFactory.markEndPosition(); expectToken(oppositeToken); |