public static Expression AnalyzeUnaryExpr(SymplUnaryExpr expr, AnalysisScope scope) { if (expr.Operation == ExpressionType.Not) { return(Expression.Not(WrapBooleanTest(AnalyzeExpr(expr.Operand, scope)))); } // Example purposes only, we should never get here since we only have Not. return(Expression.Dynamic( scope.GetRuntime().GetUnaryOperationBinder(expr.Operation), typeof(object), AnalyzeExpr(expr.Operand, scope) )); }
public static Expression AnalyzeUnaryExpr(SymplUnaryExpr expr, AnalysisScope scope) { if (expr.Operation == ExpressionType.Not) { return Expression.Not(WrapBooleanTest(AnalyzeExpr(expr.Operand, scope))); } // Example purposes only, we should never get here since we only have Not. return Expression.Dynamic( scope.GetRuntime().GetUnaryOperationBinder(expr.Operation), typeof(object), AnalyzeExpr(expr.Operand, scope) ); }