Merge branch 'MDL-62945-master' of https://github.com/HuongNV13/moodle
[moodle.git] / lib / lessphp / Tree / Assignment.php
blob2380006477ef71652c1a6d0ee880431b72b04d1b
1 <?php
3 /**
4 * Assignment
6 * @package Less
7 * @subpackage tree
8 */
9 class Less_Tree_Assignment extends Less_Tree{
11 public $key;
12 public $value;
13 public $type = 'Assignment';
15 public function __construct($key, $val) {
16 $this->key = $key;
17 $this->value = $val;
20 public function accept( $visitor ){
21 $this->value = $visitor->visitObj( $this->value );
24 public function compile($env) {
25 return new Less_Tree_Assignment( $this->key, $this->value->compile($env));
28 /**
29 * @see Less_Tree::genCSS
31 public function genCSS( $output ){
32 $output->add( $this->key . '=' );
33 $this->value->genCSS( $output );
36 public function toCss(){
37 return $this->key . '=' . $this->value->toCSS();