You are here

public static function SassScriptVariable::isa in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/SassScriptVariable.php \SassScriptVariable::isa()

* Returns a value indicating if a token of this type can be matched at * the start of the subject string. *

Parameters

string the subject string: * @return mixed match at the start of the string or false if no match

1 call to SassScriptVariable::isa()
SassScriptLexer::lex in phamlp/sass/script/SassScriptLexer.php
* Lex an expression into SassScript tokens. *

File

phamlp/sass/script/SassScriptVariable.php, line 52

Class

SassScriptVariable
SassVariable class. @package PHamlP @subpackage Sass.script.literals

Code

public static function isa($subject) {

  // we need to do the check as preg_match returns a count of 1 if
  // subject == '!important'; the match being an empty match
  return preg_match(self::MATCH, $subject, $matches) ? empty($matches[0]) ? false : $matches[0] : false;
}