Exemple #1
0
        public static Expression AnalyzeListCallExpr(SymplListCallExpr expr,
                                                     AnalysisScope scope)
        {
            var mi   = typeof(Cons).GetMethod("_List");
            int len  = expr.Elements.Length;
            var args = new Expression[len];

            for (int i = 0; i < len; i++)
            {
                args[i] = Expression.Convert(AnalyzeExpr(expr.Elements[i], scope),
                                             typeof(object));
            }
            return(Expression.Call(mi, Expression
                                   .NewArrayInit(typeof(object), args)));
        }
Exemple #2
0
 public static Expression AnalyzeListCallExpr (SymplListCallExpr expr,
                                               AnalysisScope scope) {
     var mi = typeof(Cons).GetMethod("_List");
     int len = expr.Elements.Length;
     var args = new Expression[len];
     for (int i = 0; i < len; i++) {
         args[i] = Expression.Convert(AnalyzeExpr(expr.Elements[i], scope),
                                      typeof(object));
     }
     return Expression.Call(mi, Expression
                                    .NewArrayInit(typeof(object), args));
 }