carto/lib/mess/tree/keyword.js

18 lines
390 B
JavaScript
Raw Normal View History

(function(tree) {
2010-02-24 02:39:05 +08:00
tree.Keyword = function(value) {
2010-12-14 11:21:44 +08:00
this.value = value;
var special = {
'transparent': 'color',
'true': 'boolean',
'false': 'boolean'
};
this.is = special[value] ? special[value] : 'keyword';
2010-12-14 11:21:44 +08:00
};
2010-03-04 00:59:08 +08:00
tree.Keyword.prototype = {
eval: function() { return this },
toCSS: function() { return this.value }
2010-02-24 02:39:05 +08:00
};
2011-01-06 03:23:28 +08:00
})(require('mess/tree'));