sync
[app.jsdoc] / JSDOC / ScopeNamer.js
index e0be6a2..17d061c 100644 (file)
@@ -210,7 +210,24 @@ ScopeNamer = XObject.define(
                     if (this.lookTok(-1).data == '=' &&
                         this.lookTok(-2).is('NAME')
                     ) {
+                        
                         name = this.lookTok(-2).data;
+                        
+                        if (!isGlobal) {
+                            // only this.*
+                            if (this.lookTok(-3).name == 'VAR') { 
+                                name = '';
+                            }
+                            if (name.match(/^this\./) && scope.match(/\.prototype$/)) {
+                                name = name.substring(5);
+                            }
+                            if (name.split('.').length > 1) {
+                                name = '';
+                            }
+                            
+                        }
+                        
+                        
                         this.walkFunctionDef(scope, name, this.lookTok(1).args, this.lookTok(2).items, this.lookTok(-2));
                         continue;
                     }
@@ -252,12 +269,19 @@ ScopeNamer = XObject.define(
                     // only register names of objects if 
                     var name = this.lookTok(-2).data;
                     
-                    if (isGlobal) {
-                        print ("GLOBAL: ")
+                    // some a = {} can be hidden
+                    // using @type {string} for example.
+                    // FIXME - they should be registered as a property...
+                    if (jd && jd.jsdoc && jd.jsdoc.getTag('type').length) {
                         
+                         
+                        name = false;
+                    }
+                    
+                     
                         
                         
-                    } else {
+                    if (!isGlobal) {
                         // not global.
                         if (isVar) {
                             name = false;