Ejemplo n.º 1
0
        public override bool IsEquivalentTo(AstNode otherNode)
        {
            // a binary operator is equivalent to another binary operator if the operator is the same and
            // both operands are also equivalent
            var otherBinary = otherNode as BinaryOperator;

            return(otherBinary != null &&
                   OperatorToken == otherBinary.OperatorToken &&
                   Operand1.IsEquivalentTo(otherBinary.Operand1) &&
                   Operand2.IsEquivalentTo(otherBinary.Operand2));
        }