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/Operation.php | 70 ----------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/less.php/Tree/Operation.php (limited to 'lib/less.php/Tree/Operation.php') diff --git a/lib/less.php/Tree/Operation.php b/lib/less.php/Tree/Operation.php deleted file mode 100644 index e69e0da..0000000 --- a/lib/less.php/Tree/Operation.php +++ /dev/null @@ -1,70 +0,0 @@ -op = trim($op); - $this->operands = $operands; - $this->isSpaced = $isSpaced; - } - - public function accept($visitor) { - $this->operands = $visitor->visitArray($this->operands); - } - - public function compile($env){ - $a = $this->operands[0]->compile($env); - $b = $this->operands[1]->compile($env); - - - if( Less_Environment::isMathOn() ){ - - if( $a instanceof Less_Tree_Dimension && $b instanceof Less_Tree_Color ){ - $a = $a->toColor(); - - }elseif( $b instanceof Less_Tree_Dimension && $a instanceof Less_Tree_Color ){ - $b = $b->toColor(); - - } - - if( !method_exists($a,'operate') ){ - throw new Less_Exception_Compiler("Operation on an invalid type"); - } - - return $a->operate( $this->op, $b); - } - - return new Less_Tree_Operation($this->op, array($a, $b), $this->isSpaced ); - } - - - /** - * @see Less_Tree::genCSS - */ - public function genCSS( $output ){ - $this->operands[0]->genCSS( $output ); - if( $this->isSpaced ){ - $output->add( " " ); - } - $output->add( $this->op ); - if( $this->isSpaced ){ - $output->add( ' ' ); - } - $this->operands[1]->genCSS( $output ); - } - -} -- cgit v1.2.3