JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 3c8fe12..4479462 100644 (file)
@@ -717,9 +717,9 @@ ScopeParser.prototype = {
                     //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;
                     }
@@ -872,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')