예제 #1
0
 function unfold_soak($options)
 {
     return unfold_soak($options, $this, 'variable');
 }
예제 #2
0
 function unfold_soak($options)
 {
     if ($this->soak) {
         if ($this->variable) {
             if ($ifn = unfold_soak($options, $this, 'variable')) {
                 return $ifn;
             }
             $tmp = yy('Value', $this->variable);
             list($left, $rite) = $tmp->cache_reference($options);
         } else {
             $left = yy('Literal', $this->super_reference($options));
             $rite = yy('Value', $left);
         }
         $rite = yy('Call', $rite, $this->args);
         $rite->is_new($this->is_new());
         $left = yy('Literal', 'typeof ' . $left->compile($options) . ' === "function"');
         return yy('If', $left, yy('Value', $rite), array('soak' => TRUE));
     }
     $call = $this;
     $list = array();
     while (TRUE) {
         if ($call->variable instanceof yy_Call) {
             $list[] = $call;
             $call = $call->variable;
             continue;
         }
         if (!$call->variable instanceof yy_Value) {
             break;
         }
         $list[] = $call;
         if (!($call = $call->variable->base) instanceof yy_Call) {
             break;
         }
     }
     foreach (array_reverse($list) as $call) {
         if (isset($ifn)) {
             if ($call->variable instanceof yy_Call) {
                 $call->variable = $ifn;
             } else {
                 $call->variable->base = $ifn;
             }
         }
         $ifn = unfold_soak($options, $call, 'variable');
     }
     return isset($ifn) ? $ifn : NULL;
 }
예제 #3
0
 function unfold_soak($options)
 {
     if (in_array($this->operator, array('++', '--', 'delete'), TRUE)) {
         return unfold_soak($options, $this, 'first');
     }
     return NULL;
 }