[loose parser] Be slightly more agressive about heuristically closing object literals

This commit is contained in:
Marijn Haverbeke 2014-09-22 15:03:54 +02:00
parent 12cbfed34f
commit 39fa62e90f

View File

@ -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();