Leafo\ScssPhp\Parser::pushBlock PHP Метод

pushBlock() защищенный Метод

Push block onto parse tree
protected pushBlock ( array $selectors, integer $pos ) : Leafo\ScssPhp\Block
$selectors array
$pos integer
Результат Leafo\ScssPhp\Block
    protected function pushBlock($selectors, $pos = 0)
    {
        list($line, $column) = $this->getSourcePosition($pos);
        $b = new Block();
        $b->sourceLine = $line;
        $b->sourceColumn = $column;
        $b->sourceIndex = $this->sourceIndex;
        $b->selectors = $selectors;
        $b->comments = [];
        $b->parent = $this->env;
        if (!$this->env) {
            $b->children = [];
        } elseif (empty($this->env->children)) {
            $this->env->children = $this->env->comments;
            $b->children = [];
            $this->env->comments = [];
        } else {
            $b->children = $this->env->comments;
            $this->env->comments = [];
        }
        $this->env = $b;
        return $b;
    }