Exakat\Tasks\Load::processDo PHP Method

processDo() private method

private processDo ( )
    private function processDo()
    {
        $dowhileId = $this->addAtom('Dowhile');
        $current = $this->id;
        $blockId = $this->processFollowingBlock(array(T_WHILE));
        $this->popExpression();
        $this->addLink($dowhileId, $blockId, 'BLOCK');
        $while = $this->tokens[$this->id + 1][1];
        ++$this->id;
        // Skip while
        ++$this->id;
        // Skip (
        while (!in_array($this->tokens[$this->id + 1][0], array(T_CLOSE_PARENTHESIS))) {
            $this->processNext();
        }
        ++$this->id;
        // skip )
        $conditionId = $this->popExpression();
        $this->addLink($dowhileId, $conditionId, 'CONDITION');
        $this->setAtom($dowhileId, array('code' => $this->tokens[$current][1], 'fullcode' => $this->tokens[$current][1] . ($this->atoms[$blockId]['bracket'] === true ? self::FULLCODE_BLOCK : self::FULLCODE_SEQUENCE) . $while . '(' . $this->atoms[$conditionId]['fullcode'] . ')', 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0])));
        $this->pushExpression($dowhileId);
        if (!$this->isContext(self::CONTEXT_NOSEQUENCE) && $this->tokens[$this->id + 1][0] === T_CLOSE_TAG) {
            $this->processSemicolon();
        }
        return $dowhileId;
    }
Load