carto/lib/mess/tree/comparison.js

21 lines
377 B
JavaScript

(function(tree) {
tree.Comparison = function(str) {
this.value = str;
};
tree.Comparison.prototype = {
toCSS: function() {
return {
'<': '&lt;',
'>': '&gt;',
'=': '=',
'<=': '&lt; =',
'>=': '&gt; ='}[this.value];
},
eval: function() {
return this;
}
};
})(require('mess/tree'));