Пример #1
0
 public object VisitRun(RunExpr expr)
 {
     // 1. visit the function call
     var result = expr.FuncCallExpr.Visit(this);
     
     // Case 1. Call something after?
     if (expr.FuncCallOnAfterExpr != null && expr.Mode == "after")
     {
         result = expr.FuncCallOnAfterExpr.Visit(this);
     }
     // Case 2. Call something with the input from the first ?
     else if (expr.FuncCallOnAfterExpr != null && expr.Mode == "on")
     {
         var funcCallExpr = expr.FuncCallOnAfterExpr as FunctionCallExpr;
         funcCallExpr.RetainEvaluatedParams = true;
         if(funcCallExpr.ParamList == null)
             funcCallExpr.ParamList = new List<object>();
         funcCallExpr.ParamList.Add(result);
         funcCallExpr.Visit(this);
     }
     return result;
 }
Пример #2
0
 /// <summary>
 /// Creates an array expression from the parameters supplied.
 /// </summary>
 /// <param name="fields"></param>
 /// <param name="token"></param>
 /// <returns></returns>
 public static Expr Run(string funcName, Expr funcCallExpr, TokenData token)
 {
     var exp = new RunExpr();
     exp.FuncName = funcName;
     exp.FuncCallExpr = funcCallExpr;
     SetupContext(exp, token);
     return exp;
 }
Пример #3
0
 public object VisitRun(RunExpr expr)
 {
     return null;
 }