Exakat\Tasks\Load::processYield PHP Method

processYield() private method

private processYield ( )
    private function processYield()
    {
        if (in_array($this->tokens[$this->id + 1][0], array(T_CLOSE_PARENTHESIS, T_SEMICOLON, T_CLOSE_TAG))) {
            $current = $this->id;
            // Case of return ;
            $returnArgId = $this->addAtomVoid();
            $returnId = $this->addAtom('Yield');
            $this->addLink($returnId, $returnArgId, 'YIELD');
            $x = array('code' => $this->tokens[$current][1], 'fullcode' => $this->tokens[$current][1] . ' ;', 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0]));
            $this->setAtom($returnId, $x);
            $this->addToSequence($returnId);
            return $returnId;
        } else {
            return $this->processSingleOperator('Yield', $this->precedence->get($this->tokens[$this->id][0]), 'YIELD', ' ');
        }
    }
Load