You are here

private function SassParser::buildTree in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/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 phamlp/sass/SassParser.php
* Parse Sass source into a document tree. * If the tree is already created return that. *

File

phamlp/sass/SassParser.php, line 513

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;
}