public override int GenerateCode(int loc, IVirtualMachine vm, CheckerInformation info) { loc = Expr.GenerateCode(loc, vm, info); var type = GetExpressionType(info); if (type == Type.INT32) { vm.IntInv(loc++); } else if (type == Type.DECIMAL) { vm.DecimalInv(loc++); } else { throw new IVirtualMachine.InternalError( "Cannot inverse " + type.ToString() + " value " + Expr.ToString()); } return(loc); }