public void Bin(PrimitiveOp op) { var right = stack.Pop(); var left = stack.Pop(); stack.Push(new BinOp(op, left, right)); }
public BinOp(PrimitiveOp op, Exp left, Exp right) : base(left.DataType) { this.op = op; this.left = left; this.right = right; }
public void Unary(PrimitiveOp op) { var exp = stack.Pop(); stack.Push(new Unary(op, exp)); }