X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=447946232f05cfb67d8178c16400ca545f1fa221;hb=821f387fe87df1182af1b55f621418b1ad4adb01;hp=848fb61fa98e44385e0685b295bdc9655725b1db;hpb=2bfbeed3f28a48ee6316e850a4d2000aa2725d1a;p=gnome.introspection-doc-generator diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 848fb61..4479462 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -706,16 +706,20 @@ ScopeParser.prototype = { case 'NAME': - if (this.mode == 'BUILDING_SYMBOL_TREE') + if (this.mode == 'BUILDING_SYMBOL_TREE') { + print("EXPR-NAME:" + JSON.stringify(token, null, 4)); + } else { + print("EXPR-NAME:" + token.toString()); + } symbol = token.data; //print("in NAME = " + token.toString()); //print("in NAME 0: " + this.ts.look(0).toString()); //print("in NAME 2: " + this.ts.lookTok(2).toString()); - //print(this.ts.lookTok(0).data); + //print(this.ts.lookTok(-1).data); // prefixed with '.' - if (this.ts.lookTok(0).data == ".") { + if (this.ts.lookTok(-1).data == ".") { //skip '.' break; } @@ -734,6 +738,8 @@ ScopeParser.prototype = { // any conflict with other munged symbols. this.globalScope.declareIdentifier(symbol, token); this.warn("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')', true); + print("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')'); + throw "OOPS"; } else { print("undeclared:" + token.toString()) } @@ -866,11 +872,11 @@ ScopeParser.prototype = { //println("STORING SCOPE" + this.ts.cursor); - this.indexedScopes[this.ts.cursor] = fnScope; + this.indexedScopes[token.id] = fnScope; } else { //qln("FETCHING SCOPE" + this.ts.cursor); - fnScope = this.indexedScopes[this.ts.cursor]; + fnScope = this.indexedScopes[token.id]; } if (this.mode == 'BUILDING_SYMBOL_TREE')