You are here

private function SassParser::buildTree in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/SassParser.php \SassParser::buildTree()

Builds a parse tree under the parent node. Called recursivly until the source is parsed.

Parameters

SassNode the node:

1 call to SassParser::buildTree()
SassParser::toTree in phpsass/SassParser.php
Parse Sass source into a document tree. If the tree is already created return that.

File

phpsass/SassParser.php, line 575

Class

SassParser
SassParser class. Parses {@link http://sass-lang.com/ .sass and .sccs} files. @package PHamlP @subpackage Sass

Code

private function buildTree($parent) {
  $node = $this
    ->getNode($parent);
  while (is_object($node) && $node
    ->isChildOf($parent)) {
    $parent
      ->addChild($node);
    $node = $this
      ->buildTree($node);
  }
  return $node;
}