public static function SassPropertyNode::match in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/tree/SassPropertyNode.php \SassPropertyNode::match()
Returns the matches for this type of node.
Parameters
array the line to match:
string the property syntax being used:
Return value
array matches
2 calls to SassPropertyNode::match()
- SassPropertyNode::isa in phpsass/
tree/ SassPropertyNode.php - Returns a value indicating if the token represents this type of node.
- SassPropertyNode::__construct in phpsass/
tree/ SassPropertyNode.php - SassPropertyNode constructor.
File
- phpsass/
tree/ SassPropertyNode.php, line 219
Class
- SassPropertyNode
- SassPropertyNode class. Represents a CSS property. @package PHamlP @subpackage Sass.tree
Code
public static function match($token, $syntax) {
switch ($syntax) {
case 'new':
preg_match(self::MATCH_PROPERTY_NEW, $token->source, $matches);
break;
case 'old':
preg_match(self::MATCH_PROPERTY_OLD, $token->source, $matches);
break;
default:
if (preg_match(self::MATCH_PROPERTY_NEW, $token->source, $matches) == 0) {
preg_match(self::MATCH_PROPERTY_OLD, $token->source, $matches);
}
break;
}
return $matches;
}