You are here

public function SassDebugNode::__construct in Sassy 7.3

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

SassDebugNode.

Parameters

object source token:

mixed string: an internally generated warning message about the: source boolean: the source token is a @debug or @warn directive containing the message; True if this is a @warn directive

array parameters for the message:

Return value

SassDebugNode

Overrides SassNode::__construct

File

phpsass/tree/SassDebugNode.php, line 47

Class

SassDebugNode
SassDebugNode class. Represents a Sass @debug or @warn directive. @package PHamlP @subpackage Sass.tree

Code

public function __construct($token, $message = false) {
  parent::__construct($token);
  if (is_string($message)) {
    $this->message = $message;
    $this->warning = true;
  }
  else {
    preg_match(self::MATCH, $token->source, $matches);
    $this->message = $matches[self::MESSAGE];
    $this->warning = $message;
  }
}