lessphp v0.3.9 http://leafo.net/lessphp LESS css compiler, adapted from http://lesscss.org Copyright 2012, Leaf Corcoran Licensed under MIT or GPLv3, see LICENSE Responsible for taking a string of LESS code and converting it into a syntax tree
부터: 2.0
예제 #1
0
파일: Less.php 프로젝트: Joal01/fof
 /**
  * Uses the current value of $this->count to show line and line number
  *
  * @param   type  $msg  X
  *
  * @return  void
  */
 protected function throwError($msg = null)
 {
     if ($this->sourceLoc >= 0) {
         $this->sourceParser->throwError($msg, $this->sourceLoc);
     }
     throw new exception($msg);
 }
예제 #2
0
파일: Less.php 프로젝트: Joal01/fof
 /**
  * Inject array of unparsed strings into environment as variables
  *
  * @param   type  $args  X
  *
  * @return  void
  *
  * @throws  \Exception
  */
 protected function injectVariables($args)
 {
     $this->pushEnv();
     /** FOF -- BEGIN CHANGE * */
     $parser = new Parser($this, __METHOD__);
     /** FIF -- END CHANGE * */
     foreach ($args as $name => $strValue) {
         if ($name[0] != '@') {
             $name = '@' . $name;
         }
         $parser->count = 0;
         $parser->buffer = (string) $strValue;
         if (!$parser->propertyValue($value)) {
             throw new \Exception("failed to parse passed in variable {$name}: {$strValue}");
         }
         $this->set($name, $value);
     }
 }