From 75b58c07d48b6bef5fa7188bc50a29adcde93ff0 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 15 Dec 2014 17:32:38 +0100 Subject: [PATCH] [loose parser] Improve autoclosing of expression lists --- acorn_loose.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/acorn_loose.js b/acorn_loose.js index 16176d7da8..39157f310e 100644 --- a/acorn_loose.js +++ b/acorn_loose.js @@ -1135,10 +1135,9 @@ } function parseExprList(close, allowEmpty) { - var indent = curIndent, line = curLineStart, elts = [], continuedLine = nextLineStart; + var indent = curIndent, line = curLineStart, elts = []; next(); // Opening bracket - if (curLineStart > continuedLine) continuedLine = curLineStart; - while (!closes(close, indent + (curLineStart <= continuedLine ? 1 : 0), line)) { + while (!closes(close, indent + 1, line)) { if (eat(tt.comma)) { elts.push(allowEmpty ? null : dummyIdent()); continue;