public static DynamicExpression AnalyzeDefunExpr(SymplDefunExpr expr, AnalysisScope scope) { if (!scope.IsModule) { throw new InvalidOperationException( "Use Defmethod or Lambda when not defining top-level function."); } return Expression.Dynamic( scope.GetRuntime().GetSetMemberBinder(expr.Name), typeof(object), scope.ModuleExpr, AnalyzeLambdaDef(expr.Params, expr.Body, scope, "defun " + expr.Name)); }
public static DynamicExpression AnalyzeDefunExpr(SymplDefunExpr expr, AnalysisScope scope) { if (!scope.IsModule) { throw new InvalidOperationException( "Use Defmethod or Lambda when not defining top-level function."); } return(Expression.Dynamic( scope.GetRuntime().GetSetMemberBinder(expr.Name), typeof(object), scope.ModuleExpr, AnalyzeLambdaDef(expr.Params, expr.Body, scope, "defun " + expr.Name))); }