modified error msg

This commit is contained in:
LianaHus 2015-10-23 12:44:26 +02:00
parent cb8f6633b2
commit 6e13853421

View File

@ -1180,7 +1180,13 @@ ASTPointer<Expression> 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();
}