Exakat\Tasks\Load::processDot PHP Метод

processDot() приватный Метод

private processDot ( )
    private function processDot()
    {
        $current = $this->id;
        $concatenationId = $this->addAtom('Concatenation');
        $fullcode = array();
        $rank = -1;
        $containsId = $this->popExpression();
        $this->addLink($concatenationId, $containsId, 'CONCAT');
        $this->setAtom($containsId, array('rank' => ++$rank));
        $fullcode[] = $this->atoms[$containsId]['fullcode'];
        $this->nestContext();
        $finals = $this->precedence->get($this->tokens[$this->id][0]);
        $id = array_search(T_REQUIRE, $finals);
        unset($finals[$id]);
        $id = array_search(T_REQUIRE_ONCE, $finals);
        unset($finals[$id]);
        $id = array_search(T_INCLUDE, $finals);
        unset($finals[$id]);
        $id = array_search(T_INCLUDE_ONCE, $finals);
        unset($finals[$id]);
        while (!in_array($this->tokens[$this->id + 1][0], $finals)) {
            $this->processNext();
            if ($this->tokens[$this->id + 1][0] === T_DOT) {
                $containsId = $this->popExpression();
                $this->addLink($concatenationId, $containsId, 'CONCAT');
                $fullcode[] = $this->atoms[$containsId]['fullcode'];
                $this->setAtom($containsId, array('rank' => ++$rank));
                ++$this->id;
            }
        }
        $this->exitContext();
        $containsId = $this->popExpression();
        $this->addLink($concatenationId, $containsId, 'CONCAT');
        $this->setAtom($containsId, array('rank' => ++$rank));
        $fullcode[] = $this->atoms[$containsId]['fullcode'];
        $x = array('code' => $this->tokens[$current][1], 'fullcode' => implode(' . ', $fullcode), 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0]), 'count' => $rank);
        $this->setAtom($concatenationId, $x);
        $this->pushExpression($concatenationId);
        if (!$this->isContext(self::CONTEXT_NOSEQUENCE) && $this->tokens[$this->id + 1][0] === T_CLOSE_TAG) {
            $this->processSemicolon();
        }
        return $concatenationId;
    }
Load