From fd72b0f50a355006069c5a336441f08beb7d3c50 Mon Sep 17 00:00:00 2001 From: derchris Date: Mon, 4 Feb 2019 13:11:28 +0100 Subject: Revert "update less.php to PHP 7.x compatible fork" This reverts commit 7ad9f272a482802da2d43fe83841adbe9bcd8cb4. --- lib/less.php/Tree/Directive.php | 100 ---------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 lib/less.php/Tree/Directive.php (limited to 'lib/less.php/Tree/Directive.php') diff --git a/lib/less.php/Tree/Directive.php b/lib/less.php/Tree/Directive.php deleted file mode 100644 index 04a1e46..0000000 --- a/lib/less.php/Tree/Directive.php +++ /dev/null @@ -1,100 +0,0 @@ -name = $name; - $this->value = $value; - if( $rules ){ - $this->rules = $rules; - $this->rules->allowImports = true; - } - - $this->index = $index; - $this->currentFileInfo = $currentFileInfo; - $this->debugInfo = $debugInfo; - } - - - public function accept( $visitor ){ - if( $this->rules ){ - $this->rules = $visitor->visitObj( $this->rules ); - } - if( $this->value ){ - $this->value = $visitor->visitObj( $this->value ); - } - } - - - /** - * @see Less_Tree::genCSS - */ - public function genCSS( $output ){ - $value = $this->value; - $rules = $this->rules; - $output->add( $this->name, $this->currentFileInfo, $this->index ); - if( $this->value ){ - $output->add(' '); - $this->value->genCSS($output); - } - if( $this->rules ){ - Less_Tree::outputRuleset( $output, array($this->rules)); - } else { - $output->add(';'); - } - } - - public function compile($env){ - - $value = $this->value; - $rules = $this->rules; - if( $value ){ - $value = $value->compile($env); - } - - if( $rules ){ - $rules = $rules->compile($env); - $rules->root = true; - } - - return new Less_Tree_Directive( $this->name, $value, $rules, $this->index, $this->currentFileInfo, $this->debugInfo ); - } - - - public function variable($name){ - if( $this->rules ){ - return $this->rules->variable($name); - } - } - - public function find($selector){ - if( $this->rules ){ - return $this->rules->find($selector, $this); - } - } - - //rulesets: function () { if (this.rules) return tree.Ruleset.prototype.rulesets.apply(this.rules); }, - - public function markReferenced(){ - $this->isReferenced = true; - if( $this->rules ){ - Less_Tree::ReferencedArray($this->rules->rules); - } - } - -} -- cgit v1.2.3