Bugfix: Special case of statements starting with type conversion.

This commit is contained in:
Christian 2014-11-04 15:14:31 +01:00
parent e9eef77489
commit 5dd8f3a937

View File

@ -291,8 +291,8 @@ ASTPointer<Statement> Parser::parseStatement()
// in the case of a user-defined type, we have two identifiers following each other.
if (m_scanner->getCurrentToken() == Token::MAPPING ||
m_scanner->getCurrentToken() == Token::VAR ||
Token::isElementaryTypeName(m_scanner->getCurrentToken()) ||
(m_scanner->getCurrentToken() == Token::IDENTIFIER &&
((Token::isElementaryTypeName(m_scanner->getCurrentToken()) ||
m_scanner->getCurrentToken() == Token::IDENTIFIER) &&
m_scanner->peekNextToken() == Token::IDENTIFIER))
statement = parseVariableDefinition();
else // "ordinary" expression