Paren.php 577 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Paren
  4. *
  5. * @package Less
  6. * @subpackage tree
  7. */
  8. class Less_Tree_Paren extends Less_Tree {
  9. public $value;
  10. public $type = 'Paren';
  11. public function __construct( $value ) {
  12. $this->value = $value;
  13. }
  14. public function accept( $visitor ) {
  15. $this->value = $visitor->visitObj( $this->value );
  16. }
  17. /**
  18. * @see Less_Tree::genCSS
  19. */
  20. public function genCSS( $output ) {
  21. $output->add( '(' );
  22. $this->value->genCSS( $output );
  23. $output->add( ')' );
  24. }
  25. public function compile( $env ) {
  26. return new Less_Tree_Paren( $this->value->compile( $env ) );
  27. }
  28. }