carto/lib/mess/tree/keyword.js

18 lines
390 B
JavaScript

(function(tree) {
tree.Keyword = function(value) {
this.value = value;
var special = {
'transparent': 'color',
'true': 'boolean',
'false': 'boolean'
};
this.is = special[value] ? special[value] : 'keyword';
};
tree.Keyword.prototype = {
eval: function() { return this },
toCSS: function() { return this.value }
};
})(require('mess/tree'));