You are here

public function SassRootNode::__construct in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassRootNode.php \SassRootNode::__construct()

Root SassNode constructor.

Parameters

SassParser Sass parser:

Return value

SassNode

Overrides SassNode::__construct

File

phpsass/tree/SassRootNode.php, line 44

Class

SassRootNode
SassRootNode class. Also the root node of a document. @package PHamlP @subpackage Sass.tree

Code

public function __construct($parser) {
  parent::__construct((object) array(
    'source' => '',
    'level' => -1,
    'filename' => $parser->filename,
    'line' => 0,
  ));
  $this->parser = $parser;
  $this->script = new SassScriptParser();
  $this->renderer = SassRenderer::getRenderer($parser->style);
  $this->root = $this;
}