JSDOC/Scope.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 45943b4..a7abc9c 100644 (file)
@@ -224,7 +224,7 @@ ScopeParser.prototype = {
         var isObjectLitAr = [ false ];
         var isInObjectLitAr;
         thisScope = scope;
-        if (thisScope) {
+        if (thisScope && thisScope.gid != this.scopes[this.scopes.length-1]) {
             this.scopes.push(scope);
         } else {
             thisScope = this.scopes[this.scopes.length-1]
@@ -858,7 +858,7 @@ ScopeParser.prototype = {
 
         //assert token.getType() == Token.LP;
         if (this.mode == 'BUILDING_SYMBOL_TREE') {
-            fnScope = new Scope(this.braceNesting, currentScope, token.n, '');
+            fnScope = new Scope(1, currentScope, token.n, '');
             
             //println("STORING SCOPE" + this.ts.cursor);
             
@@ -905,6 +905,7 @@ ScopeParser.prototype = {
             _this.ts = new TokenStream(tar);
             _this.parseScope(fnScope);
             
+            
         });
         
         //print(JSON.stringify(this.ts,null,4));