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

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

private processSGVariable ( $atom )
    private function processSGVariable($atom)
    {
        $current = $this->id;
        $staticId = $this->addAtom($atom);
        $rank = 0;
        if ($atom === 'Global' || $atom === 'Static') {
            $fullcodePrefix = array($this->tokens[$this->id][1]);
        } else {
            $fullcodePrefix = array();
        }
        foreach ($this->optionsTokens as $name => $optionId) {
            $this->addLink($staticId, $optionId, strtoupper($name));
            $fullcodePrefix[] = $this->atoms[$optionId]['fullcode'];
        }
        $fullcodePrefix = implode(' ', $fullcodePrefix);
        $this->optionsTokens = array();
        if (!isset($fullcodePrefix)) {
            $fullcodePrefix = $this->tokens[$current][1];
        }
        $fullcode = array();
        while ($this->tokens[$this->id + 1][0] !== T_SEMICOLON) {
            $this->processNext();
            if ($this->tokens[$this->id + 1][0] === T_COMMA) {
                $elementId = $this->popExpression();
                $this->setAtom($elementId, array('rank' => ++$rank));
                $this->addLink($staticId, $elementId, strtoupper($atom));
                $fullcode[] = $this->atoms[$elementId]['fullcode'];
                ++$this->id;
            }
        }
        $elementId = $this->popExpression();
        $this->addLink($staticId, $elementId, strtoupper($atom));
        $fullcode[] = $this->atoms[$elementId]['fullcode'];
        $this->setAtom($staticId, array('code' => $this->tokens[$current][1], 'fullcode' => $fullcodePrefix . ' ' . implode(', ', $fullcode), 'line' => $this->tokens[$current][2], 'token' => $this->getToken($this->tokens[$current][0]), 'count' => $rank));
        $this->pushExpression($staticId);
        return $staticId;
    }
Load