[Pkg-javascript-commits] [node-lexical-scope] 49/83: Added patch to ignore labels

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:50 UTC 2017


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

rouca pushed a commit to branch master
in repository node-lexical-scope.

commit d9cda72ccdca18b011ca03ef84837cbe287082df
Author: Mikola Lysenko <mikolalysenko at gmail.com>
Date:   Wed Jun 5 13:34:39 2013 -0500

    Added patch to ignore labels
---
 index.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 7ee7798..307b776 100644
--- a/index.js
+++ b/index.js
@@ -37,7 +37,10 @@ module.exports = function (src) {
             if (node.parent.type === 'MemberExpression'
             && node.parent.property === node) return;
             if (isFunction(node.parent)) return;
-            
+            if (node.parent.type === 'LabeledStatement') return;
+            if (node.parent.type === 'ContinueStatement') return;
+            if (node.parent.type === 'BreakStatement') return;
+         
             if (node.parent.type === 'AssignmentExpression') {
                 var isLeft0 = node.parent.left.type === 'MemberExpression'
                     && node.parent.left.object === node.name

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



More information about the Pkg-javascript-commits mailing list