From ef546e789a31a8ef5728625db38a673c1d9faed4 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 3 Nov 2014 18:39:16 +0100 Subject: Stylistic changes. --- AST.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'AST.cpp') diff --git a/AST.cpp b/AST.cpp index 5391e71b..0ecb639f 100644 --- a/AST.cpp +++ b/AST.cpp @@ -333,11 +333,9 @@ void Assignment::checkTypeRequirements() m_rightHandSide->expectType(*m_leftHandSide->getType()); m_type = m_leftHandSide->getType(); if (m_assigmentOperator != Token::ASSIGN) - { // compound assignment if (!m_type->acceptsBinaryOperator(Token::AssignmentToBinaryOp(m_assigmentOperator))) BOOST_THROW_EXCEPTION(createTypeError("Operator not compatible with type.")); - } } void ExpressionStatement::checkTypeRequirements() @@ -358,10 +356,8 @@ void UnaryOperation::checkTypeRequirements() // INC, DEC, ADD, SUB, NOT, BIT_NOT, DELETE m_subExpression->checkTypeRequirements(); if (m_operator == Token::Value::INC || m_operator == Token::Value::DEC || m_operator == Token::Value::DELETE) - { if (!m_subExpression->isLvalue()) BOOST_THROW_EXCEPTION(createTypeError("Expression has to be an lvalue.")); - } m_type = m_subExpression->getType(); if (!m_type->acceptsUnaryOperator(m_operator)) BOOST_THROW_EXCEPTION(createTypeError("Unary operator not compatible with type.")); -- cgit