Boo.Lang.Compiler.Ast.AstUtil.IsLhsOfInPlaceAddSubtract C# (CSharp) Method

IsLhsOfInPlaceAddSubtract() public static method

public static IsLhsOfInPlaceAddSubtract ( Expression node ) : bool
node Expression
return bool
        public static bool IsLhsOfInPlaceAddSubtract(Expression node)
        {
            if (NodeType.BinaryExpression == node.ParentNode.NodeType)
            {
                BinaryExpression be = (BinaryExpression)node.ParentNode;
                if (node == be.Left)
                {
                    BinaryOperatorType op = be.Operator;
                    return op == BinaryOperatorType.InPlaceAddition ||
                            op == BinaryOperatorType.InPlaceSubtraction;
                }
            }
            return false;
        }