[Pkg-javascript-commits] [node-acorn-jsx] 362/484: [loose parser] Improve autoclosing of expression lists

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:56 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 75b58c07d48b6bef5fa7188bc50a29adcde93ff0
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Mon Dec 15 17:32:38 2014 +0100

    [loose parser] Improve autoclosing of expression lists
---
 acorn_loose.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/acorn_loose.js b/acorn_loose.js
index 16176d7..39157f3 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -1135,10 +1135,9 @@
   }
 
   function parseExprList(close, allowEmpty) {
-    var indent = curIndent, line = curLineStart, elts = [], continuedLine = nextLineStart;
+    var indent = curIndent, line = curLineStart, elts = [];
     next(); // Opening bracket
-    if (curLineStart > continuedLine) continuedLine = curLineStart;
-    while (!closes(close, indent + (curLineStart <= continuedLine ? 1 : 0), line)) {
+    while (!closes(close, indent + 1, line)) {
       if (eat(tt.comma)) {
         elts.push(allowEmpty ? null : dummyIdent());
         continue;

-- 
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