[Pkg-javascript-commits] [node-acorn-jsx] 285/484: [loose parser] Be slightly more agressive about heuristically closing object literals

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit 39fa62e90fa3a9fc269493ceaee9fce2c747bf43
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Mon Sep 22 15:03:54 2014 +0200

    [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 e7967f1..e490eb2 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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list