lib/less/js/lib/less/tree/keyword.js in less-2.0.8 vs lib/less/js/lib/less/tree/keyword.js in less-2.0.9
- old
+ new
@@ -1,9 +1,19 @@
(function (tree) {
tree.Keyword = function (value) { this.value = value };
tree.Keyword.prototype = {
eval: function () { return this },
- toCSS: function () { return this.value }
+ toCSS: function () { return this.value },
+ compare: function (other) {
+ if (other instanceof tree.Keyword) {
+ return other.value === this.value ? 0 : 1;
+ } else {
+ return -1;
+ }
+ }
};
+
+tree.True = new(tree.Keyword)('true');
+tree.False = new(tree.Keyword)('false');
})(require('../tree'));