You are here

public static function SassDirectiveNode::extractDirective in Sassy 7.3

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

Returns the directive

Parameters

object token:

Return value

string the directive

1 call to SassDirectiveNode::extractDirective()
SassParser::parseDirective in phpsass/SassParser.php
Parses a directive

File

phpsass/tree/SassDirectiveNode.php, line 78

Class

SassDirectiveNode
SassDirectiveNode class. Represents a CSS directive. @package PHamlP @subpackage Sass.tree

Code

public static function extractDirective($token) {
  preg_match(self::MATCH, $token->source, $matches);
  return strtolower($matches[1]);
}