| 1 |
<?php |
| 2 |
/** |
| 3 |
* @private |
| 4 |
*/ |
| 5 |
class Less_Tree_Keyword extends Less_Tree implements Less_Tree_HasValueProperty { |
| 6 |
|
| 7 |
/** @var string */ |
| 8 |
public $value; |
| 9 |
|
| 10 |
/** |
| 11 |
* @param string $value |
| 12 |
*/ |
| 13 |
public function __construct( $value ) { |
| 14 |
$this->value = $value; |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* @see Less_Tree::genCSS |
| 19 |
*/ |
| 20 |
public function genCSS( $output ) { |
| 21 |
if ( $this->value === '%' ) { |
| 22 |
throw new Less_Exception_Compiler( "Invalid % without number" ); |
| 23 |
} |
| 24 |
|
| 25 |
$output->add( $this->value ); |
| 26 |
} |
| 27 |
} |