diff options
author | LianaHus <liana@ethdev.com> | 2015-10-23 18:56:50 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-23 18:56:50 +0800 |
commit | d8865f9f0540a4aff270a9c2caf5d63c3d70e7c4 (patch) | |
tree | 81e9a841e83bc78db3c9399672ba199dbeadd6bf /libsolidity/parsing/Parser.cpp | |
parent | 6e1385342143a7292d715f84b037b06f5898884f (diff) | |
download | dexon-solidity-d8865f9f0540a4aff270a9c2caf5d63c3d70e7c4.tar.gz dexon-solidity-d8865f9f0540a4aff270a9c2caf5d63c3d70e7c4.tar.zst dexon-solidity-d8865f9f0540a4aff270a9c2caf5d63c3d70e7c4.zip |
more corrections
Diffstat (limited to 'libsolidity/parsing/Parser.cpp')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index e7451396..35872f78 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1180,13 +1180,13 @@ ASTPointer<Expression> Parser::expressionFromIndexAccessStructure( void Parser::expectToken(Token::Value _value) { if (m_scanner->currentToken() != _value) - fatalParserError(std::string( + fatalParserError( string("Expected token ") + string(Token::name(_value)) + string(" got '") + string(Token::name(m_scanner->currentToken())) + string("'") - )); + ); m_scanner->next(); } @@ -1194,7 +1194,12 @@ Token::Value Parser::expectAssignmentOperator() { Token::Value op = m_scanner->currentToken(); if (!Token::isAssignmentOp(op)) - fatalParserError(std::string("Expected assignment operator")); + fatalParserError( + std::string("Expected assignment operator ") + + string(" got '") + + string(Token::name(m_scanner->currentToken())) + + string("'") + ); m_scanner->next(); return op; } @@ -1202,7 +1207,12 @@ Token::Value Parser::expectAssignmentOperator() ASTPointer<ASTString> Parser::expectIdentifierToken() { if (m_scanner->currentToken() != Token::Identifier) - fatalParserError(std::string("Expected identifier")); + fatalParserError( + std::string("Expected identifier ") + + string(" got '") + + string(Token::name(m_scanner->currentToken())) + + string("'") + ); return getLiteralAndAdvance(); } |