You are here

private function HamlParser::parseHelper in Sassy 7

* Parse a HamlHelper. *

Parameters

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

1 call to HamlParser::parseHelper()
HamlParser::parseLine in phamlp/haml/HamlParser.php
* Parse a line of Haml into a HamlNode for the document tree *

File

phamlp/haml/HamlParser.php, line 1171

Class

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

Code

private function parseHelper($line, $parent) {
  preg_match(HamlHelperNode::MATCH, $line[self::HAML_CONTENT], $matches);
  $node = new HamlHelperNode($this->helperClass, $matches[HamlHelperNode::PRE], $matches[HamlHelperNode::NAME], $matches[HamlHelperNode::ARGS], $parent);
  if (isset($matches[HamlHelperNode::BLOCK])) {
    new HamlNode($matches[HamlHelperNode::BLOCK], $node);
  }
  return $node;
}