[loose parser] Take brace-line indentation into account for objlit closing heuristic
This commit is contained in:
parent
39fa62e90f
commit
49680b1c60
@ -696,9 +696,10 @@
|
||||
var node = startNode();
|
||||
node.properties = [];
|
||||
pushCx();
|
||||
var indent = curIndent + 1, line = curLineStart;
|
||||
next();
|
||||
var propIndent = curIndent, line = curLineStart;
|
||||
while (!closes(tt.braceR, propIndent + 1, line)) {
|
||||
if (curIndent + 1 < indent) { indent = curIndent; line = curLineStart; }
|
||||
while (!closes(tt.braceR, indent, line)) {
|
||||
var name = parsePropertyName();
|
||||
if (!name) { if (isDummy(parseExpression(true))) next(); eat(tt.comma); continue; }
|
||||
var prop = startNode();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user