You are here

public function SassMixinNode::__construct in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassMixinNode.php \SassMixinNode::__construct()

SassMixinDefinitionNode constructor.

Parameters

object source token:

Return value

SassMixinNode

Overrides SassNode::__construct

File

phpsass/tree/SassMixinNode.php, line 39

Class

SassMixinNode
SassMixinNode class. Represents a Mixin. @package PHamlP @subpackage Sass.tree

Code

public function __construct($token) {
  parent::__construct($token);
  preg_match(self::MATCH, $token->source, $matches);
  if (!isset($matches[self::NAME])) {
    throw new SassMixinNodeException('Invalid mixin invocation: ($token->source)', $this);
  }
  $this->name = $matches[self::NAME];
  if (isset($matches[self::ARGS])) {
    $this->args = SassScriptFunction::extractArgs($matches[self::ARGS]);
  }
}