[Pkg-javascript-commits] [node-acorn-jsx] 101/484: Fix start offset of block nodes

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:10 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 72d2fc26446fa56f83aa13ae19cef54c501c66d4
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Wed Feb 20 10:48:36 2013 +0100

    Fix start offset of block nodes
---
 acorn_loose.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/acorn_loose.js b/acorn_loose.js
index 6f7023c..16742f8 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -397,9 +397,10 @@
   }
 
   function parseBlock() {
+    var node = startNode();
     pushCx();
     expect(tt.braceL);
-    var node = startNode(), blockIndent = curIndent, line = curLineStart;
+    var blockIndent = curIndent, line = curLineStart;
     node.body = [];
     while (!closesBlock(tt.braceR, blockIndent, line))
       node.body.push(parseStatement());

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