mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Parsing is complete
This commit is contained in:
parent
0ba24a5289
commit
de969945ea
@ -1043,9 +1043,9 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
|
|||||||
m_scanner->next();
|
m_scanner->next();
|
||||||
vector<ASTPointer<Expression>> components;
|
vector<ASTPointer<Expression>> components;
|
||||||
Token::Value oppositeToken = (token == Token::LParen ? Token::RParen : Token::RBrack);
|
Token::Value oppositeToken = (token == Token::LParen ? Token::RParen : Token::RBrack);
|
||||||
bool isArray = (token == Token::RBrace ? true : false);
|
bool isArray = (token == Token::LBrack ? true : false);
|
||||||
if (isArray && (m_scanner->currentToken() == Token::Comma))
|
if (isArray && (m_scanner->currentToken() == Token::Comma))
|
||||||
fatalParserError("Expected value in array cell after '[' .");
|
fatalParserError(std::string("Expected value in array cell after '[' ."));
|
||||||
if (m_scanner->currentToken() != oppositeToken)
|
if (m_scanner->currentToken() != oppositeToken)
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -1057,7 +1057,7 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
|
|||||||
break;
|
break;
|
||||||
else if (m_scanner->currentToken() == Token::Comma)
|
else if (m_scanner->currentToken() == Token::Comma)
|
||||||
if (isArray && (m_scanner->peekNextToken() == (Token::Comma || oppositeToken)))
|
if (isArray && (m_scanner->peekNextToken() == (Token::Comma || oppositeToken)))
|
||||||
fatalParserError("Expected value in array cell after ',' .");
|
fatalParserError(std::string("Expected value in array cell after ',' ."));
|
||||||
m_scanner->next();
|
m_scanner->next();
|
||||||
}
|
}
|
||||||
nodeFactory.markEndPosition();
|
nodeFactory.markEndPosition();
|
||||||
|
Loading…
Reference in New Issue
Block a user