[Pkg-mozext-commits] [adblock-plus] 139/464: Fixed handling of array literals as loop variables - for each (let [a, b] in foo)

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:11 UTC 2014


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

taffit pushed a commit to branch master
in repository adblock-plus.

commit 665e9a56e0169b2fb969636d80aa3ab69f4e6ce1
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Apr 22 00:03:54 2011 +0200

    Fixed handling of array literals as loop variables - for each (let [a,b] in foo)
---
 utils/astml.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils/astml.js b/utils/astml.js
index a7c7761..0065a87 100644
--- a/utils/astml.js
+++ b/utils/astml.js
@@ -547,7 +547,8 @@ function convertTOK_VAR(pn) {
   for each (let x in ast.variables) {
     if (x.type == "LetStatement")
       return x;
-    x.type = "VarDeclaration";
+    if (x.type == "IdentifierExpression")
+      x.type = "VarDeclaration";
   }
   return ast;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list