Multiplication: perform usual arithmetic conversion.
Inheritance: BinaryArithmeticOp
Example #1
0
 public override Expr ConstructBinaryOp() => Multiply.Create(this.Left, this.Right);
Example #2
0
        public void Evaluate_Multiply_Test()
        {
            Expression left = CreateIntLiteral(2);
            Expression right = CreateIntLiteral(2);

            Expression multiply = new Multiply(left, right, pos);

            Values.Int value = ((Values.Int)multiply.Accept(evaluator));

            Assert.IsTrue(value.GetValue() == 4);
        }