You are here

private function HamlParser::parseLine in Sassy 7

* Parse a line of Haml into a HamlNode for the document tree *

Parameters

array line to parse: * @param HamlNode parent node * @return HamlNode

1 call to HamlParser::parseLine()
HamlParser::buildTree in phamlp/haml/HamlParser.php
* Builds a parse tree under the parent node. *

File

phamlp/haml/HamlParser.php, line 641

Class

HamlParser
HamlParser class. Parses {@link http://haml-lang.com/ Haml} view files. @package PHamlP @subpackage Haml

Code

private function parseLine($line, $parent) {
  if ($this
    ->isHamlComment($line)) {
    return $this
      ->parseHamlComment($line);
  }
  elseif ($this
    ->isXmlComment($line)) {
    return $this
      ->parseXmlComment($line, $parent);
  }
  elseif ($this
    ->isElement($line)) {
    return $this
      ->parseElement($line, $parent);
  }
  elseif ($this
    ->isHelper($line)) {
    return $this
      ->parseHelper($line, $parent);
  }
  elseif ($this
    ->isCode($line)) {
    return $this
      ->parseCode($line, $parent);
  }
  elseif ($this
    ->isDirective($line)) {
    return $this
      ->parseDirective($line, $parent);
  }
  elseif ($this
    ->isFilter($line)) {
    return $this
      ->parseFilter($line, $parent);
  }
  elseif ($this
    ->isDoctype($line)) {
    return $this
      ->parseDoctype($line, $parent);
  }
  else {
    return $this
      ->parseContent($line, $parent);
  }
}