Exemple #1
0
 public static Frame Synthetic(Frame th, Cursor parent, string method,
         int from, int to, Variable caplist)
 {
     VarDeque iter = Builtins.start_iter(caplist);
     CapInfo ci = null;
     while (Kernel.IterHasFlat(iter, true)) {
         P6any pair = iter.Shift().Fetch();
         Variable k = (Variable)pair.GetSlot("key");
         Variable v = (Variable)pair.GetSlot("value");
         ci = new CapInfo(ci, new string[] {
                 k.Fetch().mo.mro_raw_Str.Get(k) }, v);
     }
     Cursor r = new Cursor(parent.global, parent.save_klass, from, to, ci,
             null, method);
     th.SetDynamic(th.info.dylex["$*match"], Kernel.NewROScalar(r));
     return r.global.CallAction(th, method, r);
 }