diff --git a/node_modules/treehugger/lib/acorn/dist/acorn_loose.js b/node_modules/treehugger/lib/acorn/dist/acorn_loose.js index e5974e32..a643d442 100644 --- a/node_modules/treehugger/lib/acorn/dist/acorn_loose.js +++ b/node_modules/treehugger/lib/acorn/dist/acorn_loose.js @@ -1146,6 +1146,7 @@ lp.parseImportSpecifierList = function () { this.pushCx(); this.eat(tt.braceL); if (this.curLineStart > continuedLine) continuedLine = this.curLineStart; + var lastTokenStart = -1; while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { var elt = this.startNode(); if (this.eat(tt.star)) { @@ -1157,6 +1158,8 @@ lp.parseImportSpecifierList = function () { elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported; this.finishNode(elt, "ImportSpecifier"); } + if (elt.start == lastTokenStart) break; + lastTokenStart = elt.start; elts.push(elt); this.eat(tt.comma); }