Files
less.js/lib/less/tree/comment.js
2013-07-05 06:51:01 +01:00

20 lines
535 B
JavaScript

(function (tree) {
tree.Comment = function (value, silent, index, currentFileInfo) {
this.value = value;
this.silent = !!silent;
this.currentFileInfo = currentFileInfo;
};
tree.Comment.prototype = {
type: "Comment",
toCSS: function (env) {
return (env.compress || (this.currentFileInfo && this.currentFileInfo.silent && !this.isNotSilent)) ? '' : this.value;
},
eval: function () { return this; },
markNotSilent: function () {
this.isNotSilent = true;
}
};
})(require('../tree'));