public static function SassPropertyNode::match in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassPropertyNode.php \SassPropertyNode::match()
* Returns the matches for this type of node. *
Parameters
array the line to match: * @param string the property syntax being used * @return array matches
2 calls to SassPropertyNode::match()
- SassPropertyNode::isa in phamlp/
sass/ tree/ SassPropertyNode.php - * Returns a value indicating if the token represents this type of node. *
- SassPropertyNode::__construct in phamlp/
sass/ tree/ SassPropertyNode.php - * SassPropertyNode constructor. *
File
- phamlp/
sass/ tree/ SassPropertyNode.php, line 217
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;
}