mirror of
https://github.com/less/less.js.git
synced 2026-02-02 11:05:10 -05:00
29 lines
561 B
JavaScript
29 lines
561 B
JavaScript
(function (tree) {
|
|
|
|
tree.Anonymous = function (string) {
|
|
this.value = string.value || string;
|
|
};
|
|
tree.Anonymous.prototype = {
|
|
type: "Anonymous",
|
|
toCSS: function () {
|
|
return this.value;
|
|
},
|
|
eval: function () { return this },
|
|
compare: function (x) {
|
|
if (!x.toCSS) {
|
|
return -1;
|
|
}
|
|
|
|
var left = this.toCSS(),
|
|
right = x.toCSS();
|
|
|
|
if (left === right) {
|
|
return 0;
|
|
}
|
|
|
|
return left < right ? -1 : 1;
|
|
}
|
|
};
|
|
|
|
})(require('../tree'));
|