SassMixinDefinitionNode::__construct PHP Method

__construct() public method

SassMixinDefinitionNode constructor.
public __construct ( object $token ) : SassMixinDefinitionNode
$token object source token
return SassMixinDefinitionNode
    public function __construct($token)
    {
        preg_match(self::MATCH, $token->source, $matches);
        parent::__construct($token);
        if (empty($matches)) {
            throw new SassMixinDefinitionNodeException('Invalid Mixin', $this);
        }
        $this->name = $matches[self::NAME];
        if (isset($matches[self::ARGUMENTS])) {
            $this->args = SassScriptFunction::extractArgs($matches[self::ARGUMENTS], true, new SassContext());
        }
    }