Exakat\Tasks\Load::processBracket PHP Method

processBracket() private method

private processBracket ( $followupFCOA = true )
    private function processBracket($followupFCOA = true)
    {
        $id = $this->addAtom('Array');
        $current = $this->id;
        $variableId = $this->popExpression();
        $this->addLink($id, $variableId, 'VARIABLE');
        // Skip opening bracket
        $opening = $this->tokens[$this->id + 1][0];
        if ($opening === '{') {
            $closing = '}';
        } else {
            $closing = ']';
        }
        ++$this->id;
        do {
            $this->processNext();
        } while (!in_array($this->tokens[$this->id + 1][0], array(T_CLOSE_BRACKET, T_CLOSE_CURLY)));
        // Skip closing bracket
        ++$this->id;
        $indexId = $this->popExpression();
        $this->addLink($id, $indexId, 'INDEX');
        $this->setAtom($id, array('code' => $opening, 'fullcode' => $this->atoms[$variableId]['fullcode'] . $opening . $this->atoms[$indexId]['fullcode'] . $closing, 'line' => $this->tokens[$current][2], 'variadic' => false, 'token' => $this->getToken($this->tokens[$current][0]), 'enclosing' => false));
        $this->pushExpression($id);
        if (!$this->isContext(self::CONTEXT_NOSEQUENCE) && $this->tokens[$this->id + 1][0] === T_CLOSE_TAG) {
            $this->processSemicolon();
        } elseif ($followupFCOA === true) {
            $id = $this->processFCOA($id);
        }
        return $id;
    }
Load