mirror of
https://github.com/less/less.js.git
synced 2026-02-01 18:44:57 -05:00
22 lines
652 B
JavaScript
22 lines
652 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) {
|
|
var isReference = (this.currentFileInfo && this.currentFileInfo.reference && !this.isReferenced),
|
|
isCompressed = env.compress && !this.value.match(/^\/\*!/);
|
|
return (isReference || isCompressed) ? '' : this.value;
|
|
},
|
|
eval: function () { return this; },
|
|
markReferenced: function () {
|
|
this.isReferenced = true;
|
|
}
|
|
};
|
|
|
|
})(require('../tree'));
|