[Pkg-javascript-commits] [node-acorn-jsx] 271/484: Remove unused local variables.

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:42 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 1ca211529407bd6905c5a0bdffebd535c359dd68
Author: Max Schaefer <max at semmle.com>
Date:   Fri Aug 15 09:15:05 2014 +0100

    Remove unused local variables.
---
 acorn.js       | 10 +++++-----
 acorn_loose.js |  7 +++----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/acorn.js b/acorn.js
index 53cd0d6..fc7aeaf 100644
--- a/acorn.js
+++ b/acorn.js
@@ -2082,7 +2082,7 @@
         if (options.allowTrailingCommas && eat(_braceR)) break;
       } else first = false;
 
-      var prop = startNode(), kind, isGenerator;
+      var prop = startNode(), isGenerator;
       if (options.ecmaVersion >= 6) {
         prop.method = false;
         prop.shorthand = false;
@@ -2091,19 +2091,19 @@
       parsePropertyName(prop);
       if (eat(_colon)) {
         prop.value = parseExpression(true);
-        kind = prop.kind = "init";
+        prop.kind = "init";
       } else if (options.ecmaVersion >= 6 && tokType === _parenL) {
-        kind = prop.kind = "init";
+        prop.kind = "init";
         prop.method = true;
         prop.value = parseMethod(isGenerator);
       } else if (options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
                  (prop.key.name === "get" || prop.key.name === "set")) {
         if (isGenerator) unexpected();
-        kind = prop.kind = prop.key.name;
+        prop.kind = prop.key.name;
         parsePropertyName(prop);
         prop.value = parseMethod(false);
       } else if (options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
-        kind = prop.kind = "init";
+        prop.kind = "init";
         prop.value = prop.key;
         prop.shorthand = true;
       } else unexpected();
diff --git a/acorn_loose.js b/acorn_loose.js
index de29599..208c188 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -693,15 +693,14 @@
     while (!closes(tt.braceR, propIndent, line)) {
       var name = parsePropertyName();
       if (!name) { if (isDummy(parseExpression(true))) next(); eat(tt.comma); continue; }
-      var prop = startNode(), isGetSet = false, kind;
+      var prop = startNode();
       prop.key = name;
       if (eat(tt.colon)) {
         prop.value = parseExpression(true);
-        kind = prop.kind = "init";
+        prop.kind = "init";
       } else if (options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
                  (prop.key.name === "get" || prop.key.name === "set")) {
-        isGetSet = true;
-        kind = prop.kind = prop.key.name;
+        prop.kind = prop.key.name;
         prop.key = parsePropertyName() || dummyIdent();
         prop.value = parseFunction(startNode(), false);
       } else {

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