Ejemplo n.º 1
0
 public void CanAddStrings()
 {
     OpAdd add = new OpAdd();
     add.addChild( new StringLiteralNode("20"));
     add.addChild( new StringLiteralNode("30"));
     object result = add.GetValue(null, null);
     Assert.AreEqual("2030", result);
 }
Ejemplo n.º 2
0
 public void CanAddNumbers()
 {
     OpAdd add = new OpAdd();
     add.addChild( new IntLiteralNode("20"));
     add.addChild( new IntLiteralNode("30"));
     object result = add.GetValue(null, null);
     Assert.AreEqual(50, result);
 }
Ejemplo n.º 3
0
        public void CanAddNumbers()
        {
            OpAdd add = new OpAdd();

            add.addChild(new IntLiteralNode("20"));
            add.addChild(new IntLiteralNode("30"));
            object result = add.GetValue(null, null);

            Assert.AreEqual(50, result);
        }
Ejemplo n.º 4
0
        public void CanAddStrings()
        {
            OpAdd add = new OpAdd();

            add.addChild(new StringLiteralNode("20"));
            add.addChild(new StringLiteralNode("30"));
            object result = add.GetValue(null, null);

            Assert.AreEqual("2030", result);
        }
Ejemplo n.º 5
0
 public static void Rule(BinaryOp500 lhs, OpAdd op)
 {
     lhs.CodeFunctor = new CodeFunctor(op.Text, 2, true);
 }
Ejemplo n.º 6
0
 public static Expr _Add(Expr lhs, OpAdd op, Expr rhs)
 {
     return(new AddExpr(lhs, rhs));
 }
Ejemplo n.º 7
0
 public static void Rule(BinaryOp500 lhs, OpAdd op)
 {
     lhs.CodeFunctor = new CodeFunctor(op.Text, 2, true);
 }