From 39fa62e90fa3a9fc269493ceaee9fce2c747bf43 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 22 Sep 2014 15:03:54 +0200 Subject: [PATCH] [loose parser] Be slightly more agressive about heuristically closing object literals --- acorn_loose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn_loose.js b/acorn_loose.js index e7967f1d30..e490eb2761 100644 --- a/acorn_loose.js +++ b/acorn_loose.js @@ -698,7 +698,7 @@ pushCx(); next(); var propIndent = curIndent, line = curLineStart; - while (!closes(tt.braceR, propIndent, line)) { + while (!closes(tt.braceR, propIndent + 1, line)) { var name = parsePropertyName(); if (!name) { if (isDummy(parseExpression(true))) next(); eat(tt.comma); continue; } var prop = startNode();