carto/lib/mess/tree/keyword.js
2011-01-21 18:28:54 -05:00

18 lines
393 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 },
toString: function() { return this.value }
};
})(require('mess/tree'));