remove estraverse attach comments method, fix up tests
This commit is contained in:
parent
2bb5101112
commit
9c452f5b14
@ -363,8 +363,6 @@ function monkeypatch() {
|
||||
}
|
||||
|
||||
exports.attachComments = function (ast, comments, tokens) {
|
||||
estraverse.attachComments(ast, comments, tokens);
|
||||
|
||||
if (comments.length) {
|
||||
var firstComment = comments[0];
|
||||
var lastComment = comments[comments.length - 1];
|
||||
@ -456,7 +454,7 @@ exports.parse = function (code) {
|
||||
}
|
||||
}
|
||||
ast.comments = comments;
|
||||
exports.attachComments(ast, comments, tokens);
|
||||
exports.attachComments(ast, comments, ast.tokens);
|
||||
|
||||
// transform esprima and acorn divergent nodes
|
||||
acornToEsprima.toAST(ast);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user