qrcode.chapril.org-libreqr/vendor/wikimedia/less.php/lib/Less/Tree/Anonymous.php

55 lines
1.0 KiB
PHP
Raw Normal View History

2021-02-15 21:29:38 +01:00
<?php
/**
2023-07-07 22:33:10 +02:00
* @private
2021-02-15 21:29:38 +01:00
*/
class Less_Tree_Anonymous extends Less_Tree {
public $value;
public $quote;
public $index;
public $mapLines;
public $currentFileInfo;
public $type = 'Anonymous';
/**
2023-07-07 22:33:10 +02:00
* @param int $index
* @param bool|null $mapLines
2021-02-15 21:29:38 +01:00
*/
public function __construct( $value, $index = null, $currentFileInfo = null, $mapLines = null ) {
$this->value = $value;
$this->index = $index;
$this->mapLines = $mapLines;
$this->currentFileInfo = $currentFileInfo;
}
2023-07-07 22:33:10 +02:00
public function compile( $env ) {
2021-02-15 21:29:38 +01:00
return new Less_Tree_Anonymous( $this->value, $this->index, $this->currentFileInfo, $this->mapLines );
}
public function compare( $x ) {
if ( !is_object( $x ) ) {
return -1;
}
$left = $this->toCSS();
$right = $x->toCSS();
if ( $left === $right ) {
return 0;
}
return $left < $right ? -1 : 1;
}
/**
* @see Less_Tree::genCSS
*/
public function genCSS( $output ) {
$output->add( $this->value, $this->currentFileInfo, $this->index, $this->mapLines );
}
public function toCSS() {
return $this->value;
}
}