X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScope.js;h=aa145c3dbcb84a895c539fff8dcdb1cef79325ab;hp=53e78d0e36395d6652e61d41e254672b98724350;hb=0a9f2a831d9568700ed000004d71cb8199e1f7c7;hpb=884bdd01f3b3be72df5db5936c2a79dee0be7780 diff --git a/JSDOC/Scope.js b/JSDOC/Scope.js index 53e78d0..aa145c3 100644 --- a/JSDOC/Scope.js +++ b/JSDOC/Scope.js @@ -25,7 +25,8 @@ function Scope(braceN, parent, startTokN, lastIdent, token) this.ident = lastIdent; this.gid = Scope.gid++; - print("ADD SCOPE(" + this.gid + ") TO "+ (parent ? this.parent.gid : 'TOP')) + ' : ' + token.toString()); + //print("ADD SCOPE(" + this.gid + ") TO "+ (parent ? this.parent.gid : 'TOP') + ' : ' + + // (token ? token.toString() : '')); if (parent) { this.parent.subScopes.push(this); @@ -54,7 +55,7 @@ Scope.prototype = { protectedVars : {}, // only used by to parent.. declareIdentifier : function(symbol, token) { - print("SCOPE : " + this.gid + " : " + token.toString()+""); + //print("SCOPE : " + this.gid + " :SYM: " + symbol + " " + token.toString()+""); if (typeof(this.identifiers[symbol])== 'undefined') { @@ -69,6 +70,8 @@ Scope.prototype = { // then it's global... this.identifiers[symbol].toMunge = false; } + + this.addToParentScope(symbol); return this.identifiers[symbol]; }, @@ -78,10 +81,10 @@ Scope.prototype = { return false; } - print("SCOPE : " + this.gid +" = SYMBOL NOT FOUND?" + token.toString()); + //print("SCOPE : " + this.gid +" = SYMBOL NOT FOUND?" + token.toString()); return false; } - print("SCOPE : " + this.gid +" = FOUND:" + token.toString()); + //print("SCOPE : " + this.gid +" = FOUND:" + token.toString()); return this.identifiers[symbol]; }, @@ -238,7 +241,7 @@ Scope.prototype = { if (!repsym.length) { if (!freeSymbols.length) { - addSyms(JSDOC.Scope.twos); + addSyms(Scope.twos); } repsym = freeSymbols.shift(); // pop off beginngin??? }