public override void VisitMinus(Minus n) { SetupOperands(n); if (n.InternalType.ToString() == "span") { // date subtraction, no need to reinvent the wheel... var method = typeof (DateTime).GetMethod("op_Subtraction", BindingFlags.Public | BindingFlags.Static, null, new[] {typeof (DateTime), typeof (DateTime)}, null); _gen.Emit(OpCodes.Call, method); } else { //pop 2, sub, push result _gen.Emit(OpCodes.Sub); } }
public override void VisitMinus(Minus n) { VisitBinaryArithmetic(n); }