You are here

public function SassEachNode::__construct in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassEachNode.php \SassEachNode::__construct()

* SassEachNode constructor. *

Parameters

object source token: * @return SassEachNode

Overrides SassNode::__construct

File

phamlp/sass/tree/SassEachNode.php, line 45

Class

SassEachNode
SassEachNode class. Represents a Sass @each loop. @package PHamlP @subpackage Sass.tree

Code

public function __construct($token) {
  parent::__construct($token);
  if (!preg_match(self::MATCH, $token->source, $matches)) {
    throw new SassEachNodeException('Invalid {what}', array(
      '{what}' => '@each directive',
    ), $this);
  }
  $this->variable = $matches[self::VARIABLE];
  $this->in = $matches[self::IN];
}