public function SassDebugNode::__construct in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassDebugNode.php \SassDebugNode::__construct()
* SassDebugNode. *
Parameters
object source token: * @param 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 * @param array parameters for the message * @return SassDebugNode
Overrides SassNode::__construct
File
- phamlp/
sass/ 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, $params = array()) {
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;
}
$this->params = $params;
}