diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 57f3e9132..e74513969 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -1180,7 +1180,13 @@ ASTPointer Parser::expressionFromIndexAccessStructure( void Parser::expectToken(Token::Value _value) { if (m_scanner->currentToken() != _value) - fatalParserError(std::string(string("Expected token ") + string(Token::name(_value)))); + fatalParserError(std::string( + string("Expected token ") + + string(Token::name(_value)) + + string(" got '") + + string(Token::name(m_scanner->currentToken())) + + string("'") + )); m_scanner->next(); }