From 9c452f5b14982c52ca835744306eb2f073b6d20b Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Wed, 22 Jul 2015 00:36:03 -0400 Subject: [PATCH] remove estraverse attach comments method, fix up tests --- eslint/babel-eslint-parser/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eslint/babel-eslint-parser/index.js b/eslint/babel-eslint-parser/index.js index 355fc5d34e..efbac4bf3b 100644 --- a/eslint/babel-eslint-parser/index.js +++ b/eslint/babel-eslint-parser/index.js @@ -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);