From 5dd8f3a9370bba0e06d9afb581fc96056288c88a Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 4 Nov 2014 15:14:31 +0100 Subject: [PATCH] Bugfix: Special case of statements starting with type conversion. --- Parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Parser.cpp b/Parser.cpp index 44f0a54ad..72770f679 100644 --- a/Parser.cpp +++ b/Parser.cpp @@ -290,10 +290,10 @@ ASTPointer Parser::parseStatement() // We have a variable definition if we ge a keyword that specifies a type name, or // 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 && - m_scanner->peekNextToken() == Token::IDENTIFIER)) + m_scanner->getCurrentToken() == Token::VAR || + ((Token::isElementaryTypeName(m_scanner->getCurrentToken()) || + m_scanner->getCurrentToken() == Token::IDENTIFIER) && + m_scanner->peekNextToken() == Token::IDENTIFIER)) statement = parseVariableDefinition(); else // "ordinary" expression statement = parseExpression();