| @@ 4590-4603 (lines=14) @@ | ||
| 4587 | return new Less_Tree_Anonymous($this->value, $this->index, $this->currentFileInfo, $this->mapLines); |
|
| 4588 | } |
|
| 4589 | ||
| 4590 | public function compare($x){ |
|
| 4591 | if( !is_object($x) ){ |
|
| 4592 | return -1; |
|
| 4593 | } |
|
| 4594 | ||
| 4595 | $left = $this->toCSS(); |
|
| 4596 | $right = $x->toCSS(); |
|
| 4597 | ||
| 4598 | if( $left === $right ){ |
|
| 4599 | return 0; |
|
| 4600 | } |
|
| 4601 | ||
| 4602 | return $left < $right ? -1 : 1; |
|
| 4603 | } |
|
| 4604 | ||
| 4605 | /** |
|
| 4606 | * @see Less_Tree::genCSS |
|
| @@ 6612-6626 (lines=15) @@ | ||
| 6609 | return new Less_Tree_Quoted($this->quote . $value . $this->quote, $value, $this->escaped, $this->index, $this->currentFileInfo); |
|
| 6610 | } |
|
| 6611 | ||
| 6612 | public function compare($x) { |
|
| 6613 | ||
| 6614 | if( !Less_Parser::is_method($x, 'toCSS') ){ |
|
| 6615 | return -1; |
|
| 6616 | } |
|
| 6617 | ||
| 6618 | $left = $this->toCSS(); |
|
| 6619 | $right = $x->toCSS(); |
|
| 6620 | ||
| 6621 | if ($left === $right) { |
|
| 6622 | return 0; |
|
| 6623 | } |
|
| 6624 | ||
| 6625 | return $left < $right ? -1 : 1; |
|
| 6626 | } |
|
| 6627 | } |
|
| 6628 | ||
| 6629 | ||