mirror of
https://github.com/less/less.js.git
synced 2026-02-03 11:35:08 -05:00
20 lines
541 B
JavaScript
20 lines
541 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.reference && !this.isReferenced)) ? '' : this.value;
|
|
},
|
|
eval: function () { return this; },
|
|
markReferenced: function () {
|
|
this.isReferenced = true;
|
|
}
|
|
};
|
|
|
|
})(require('../tree'));
|