carto/lib/mess/tree/comparison.js
2011-01-19 18:01:30 -05:00

21 lines
375 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'));