X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=a7abc9c54784d1cfd7e7ea1ebe9f5bc7e0a823b1;hb=832edf57cab75465f624fb5b1503a683a04ad972;hp=237f6b62c126d79c0f2abd43aa7263de876caf76;hpb=4fe5eef1c078b7e47d72ca965654f04a03914e5a;p=gnome.introspection-doc-generator diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 237f6b6..a7abc9c 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -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] @@ -641,7 +641,7 @@ ScopeParser.prototype = { // key value.. this.ts = new TokenStream(token.props[prop].val); - this.parseScope(currentScope); + this.parseScope(false); } this.ts = curTS; @@ -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));