From 4647f966eb291777af4da448af08def26730a24a Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 28 Oct 2014 13:12:18 +0200 Subject: [PATCH] Loose: don't silently skip missed elements in expr list. --- acorn_loose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acorn_loose.js b/acorn_loose.js index 197e184369..7585b83b28 100644 --- a/acorn_loose.js +++ b/acorn_loose.js @@ -968,8 +968,8 @@ next(); // Opening bracket if (curLineStart > continuedLine) continuedLine = curLineStart; while (!closes(close, indent + (curLineStart <= continuedLine ? 1 : 0), line)) { - if (allowEmpty && eat(tt.comma)) { - elts.push(null); + if (eat(tt.comma)) { + elts.push(allowEmpty ? null : dummyIdent()); continue; } var elt = parseExpression(true);