mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Enforce commas in tuple syntax
This commit is contained in:
committed by
Alex Beregszaszi
parent
5b26e2bcee
commit
a8c047f48d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user