JSDOC/ScopeNamer.js
[app.jsdoc] / JSDOC / ScopeNamer.js
index 708757d..d1b7d36 100644 (file)
@@ -132,9 +132,18 @@ ScopeNamer = XObject.define(
             this.debugCall("walkStatements :" + scope ) ;            
             var _this = this;
             var res = false;
-            
-            
-            statements.forEach(function(st ) {
+            var isGlobal = scope == '_global_';
+           
+            statements.some(function(st ) {
+                 
+                if (isGlobal &&
+                        st[0].jsdoc &&
+                        st[0].jsdoc.getTag('scope').length
+                   ) {
+                    
+                    print("GOT scope");
+                    print(st[0].jsdoc.getTag('scope'));
+                 }
                 
                 
                 res = _this.walkStatement(scope, st);
@@ -156,12 +165,22 @@ ScopeNamer = XObject.define(
             
             var isGlobal = scope == '_global_';
             
-            if (scope == '_global_' &&
+            
+            
+            //if (this.filename.match(/pack\.js/) && isGlobal) {
+            //    print(JSON.stringify(stmt , null,4));
+            //}
+            // @ignore stops the parser..
+            if (isGlobal &&
                     stmt[0].jsdoc &&
                     stmt[0].jsdoc.getTag('ignore').length
                ) {
+                this.debugCall("walkStatement : ignore found - " + scope + '@' + this.tokens[0].line );
+                print("GOT ignore?");
                 return true;
             }
+           
+            
             while (null != (token = this.next())) {
                 
                 //'function'