JSDOC/ScopeNamer.js
authorAlan Knowles <alan@roojs.com>
Sun, 27 Nov 2011 15:09:26 +0000 (23:09 +0800)
committerAlan Knowles <alan@roojs.com>
Sun, 27 Nov 2011 15:09:26 +0000 (23:09 +0800)
JSDOC/ScopeNamer.js

index 354d0fd..3e5b353 100644 (file)
@@ -437,7 +437,7 @@ ScopeNamer = XObject.define(
                     }
                     // including ... aaa = new BBB({
                 
-                    if (token.data == 'new' && this.lookTok(-1).data == '=' && this.lookTok(-2).is('NAME')) {
+                    if (token.data == 'new' && !isVar && name) {
                         var mname = this.lookTok(1).data;
                         var args = this.lookTok(2).items;
                         
@@ -445,6 +445,8 @@ ScopeNamer = XObject.define(
                             // have a go at applying the properties..
                             
                         }
+                        this.next();
+                        this.next();
                         
                         
                     }