match() public static method

Returns the matches for this type of node.
public static match ( object $token, string $syntax ) : array
$token object
$syntax string the property syntax being used
return array matches
Beispiel #1
0
 /**
  * Parses a property
  * @param string line to parse
  * @return SassPropertyNode property node
  */
 private function parseProperty($line)
 {
     $matches = SassPropertyNode::match($line, $this->options['property_syntax']);
     return new SassPropertyNode($matches[SassPropertyNode::NAME], $matches[SassPropertyNode::VALUE], $matches[SassPropertyNode::SCRIPT] === SassPropertyNode::IS_SCRIPT);
 }