Пример #1
0
 public dynamic Run(ref Dictionary<string, dynamic> local,ScriptRunner runner)
 {
     dynamic first = this.first.ValueEval(local, runner);
     dynamic last = this.last.ValueEval(local, runner);
     dynamic step = this.step.ValueEval(local, runner);
     if (local.ContainsKey(counter))
         throw new Exception(data.ExceptionMessage(string.Format("valuename {0} has been defined in this scopr", counter)));
     for (var d = first;d!= last;d+=step)
     {
         local[counter] = d;
         runner.Run(codes, local);
         d = local[counter];
     }
     local.Remove(counter);
     return null;
 }
Пример #2
0
        public dynamic ValueEval(Dictionary <string, dynamic> local, ScriptRunner runner)
        {
            var v = (from e in exprs select e.ValueEval(local, runner)).ToArray();

            return(this.func(v, data));
        }
Пример #3
0
 public dynamic ValueEval(Dictionary <string, dynamic> local, ScriptRunner runner)
 {
     return(val);
 }
Пример #4
0
 public dynamic Run(ref Dictionary<string, dynamic> local, ScriptRunner runner)
 {
     expr.ValueEval(local, runner);
     return null;
 }
Пример #5
0
 public dynamic Run(ref Dictionary<string, dynamic> local, ScriptRunner runner)
 {
     var v = cond.ValueEval(local, runner);
     while(v)
     {
         runner.Run(codes, local);
         v = cond.ValueEval(local, runner);
     }
     return null;
 }
Пример #6
0
 public dynamic Run(ref Dictionary<string, dynamic> local, ScriptRunner runner)
 {
     foreach(var p in codes)
     {
         if (p.Item1.ValueEval(local, runner))
             return runner.Run(p.Item2, local);
     }
     return runner.Run(elsecode, local);
 }
Пример #7
0
 public dynamic Run(ref Dictionary <string, dynamic> local, ScriptRunner runner)
 {
     expr.ValueEval(local, runner);
     return(null);
 }