Пример #1
0
 /**
  * @param object $token source token
  */
 public function __construct($token)
 {
     parent::__construct($token);
     preg_match(self::MATCH, $token->source, $matches);
     if (empty($matches)) {
         return new Literals\Boolean(FALSE);
     }
     $this->statement = $matches[self::STATEMENT];
 }
Пример #2
0
 /**
  * @param object $token source token
  * @param Node $parent
  */
 public function __construct($token, $parent)
 {
     parent::__construct($token);
     $this->parent = $parent;
     preg_match(self::MATCH, $token->source, $matches);
     foreach (\PHPSass\Script\Literals\SassList::_build_list($matches[self::FILES]) as $file) {
         $this->files[] = trim($file, '"\'; ');
     }
 }
Пример #3
0
 /**
  * @param object $token source token
  * @throws MixinNodeException
  */
 public function __construct($token)
 {
     parent::__construct($token);
     preg_match(self::MATCH, $token->source, $matches);
     if (!isset($matches[self::NAME])) {
         throw new MixinNodeException('Invalid mixin invocation: ($token->source)', $this);
     }
     $this->name = $matches[self::NAME];
     if (isset($matches[self::ARGS]) && strlen($matches[self::ARGS])) {
         $this->args = $matches[self::ARGS];
     }
 }