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/Visitor/joinSelector.php | 70 ----------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/less.php/Visitor/joinSelector.php (limited to 'lib/less.php/Visitor/joinSelector.php') diff --git a/lib/less.php/Visitor/joinSelector.php b/lib/less.php/Visitor/joinSelector.php deleted file mode 100644 index f62af1a..0000000 --- a/lib/less.php/Visitor/joinSelector.php +++ /dev/null @@ -1,70 +0,0 @@ -visitObj($root); - } - - public function visitRule( $ruleNode, &$visitDeeper ){ - $visitDeeper = false; - } - - public function visitMixinDefinition( $mixinDefinitionNode, &$visitDeeper ){ - $visitDeeper = false; - } - - public function visitRuleset( $rulesetNode ){ - - $paths = array(); - - if( !$rulesetNode->root ){ - $selectors = array(); - - if( $rulesetNode->selectors && $rulesetNode->selectors ){ - foreach($rulesetNode->selectors as $selector){ - if( $selector->getIsOutput() ){ - $selectors[] = $selector; - } - } - } - - if( !$selectors ){ - $rulesetNode->selectors = null; - $rulesetNode->rules = null; - }else{ - $context = end($this->contexts); //$context = $this->contexts[ count($this->contexts) - 1]; - $paths = $rulesetNode->joinSelectors( $context, $selectors); - } - - $rulesetNode->paths = $paths; - } - - $this->contexts[] = $paths; //different from less.js. Placed after joinSelectors() so that $this->contexts will get correct $paths - } - - public function visitRulesetOut(){ - array_pop($this->contexts); - } - - public function visitMedia($mediaNode) { - $context = end($this->contexts); //$context = $this->contexts[ count($this->contexts) - 1]; - - if( !count($context) || (is_object($context[0]) && $context[0]->multiMedia) ){ - $mediaNode->rules[0]->root = true; - } - } - -} - -- cgit v1.2.3