If supplied, attach filename property to comment node loc. (#80)
This commit is contained in:
committed by
Daniel Tschinder
parent
f576865ce9
commit
4811d617ce
@@ -33,6 +33,7 @@ function last(stack) {
|
||||
const pp = Parser.prototype;
|
||||
|
||||
pp.addComment = function (comment) {
|
||||
if (this.filename) comment.loc.filename = this.filename;
|
||||
this.state.trailingComments.push(comment);
|
||||
this.state.leadingComments.push(comment);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user