JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 43bdaf3..98ca9cf 100644 (file)
@@ -229,7 +229,7 @@ ScopeParser.prototype = {
         //this.scopes.forEach(function() {
         //    scopeIndent += '   '; 
         //});
-        //print(scopeIndent + ">> ENTER SCOPE");
+        print(">> ENTER SCOPE");
         
         
         
@@ -238,7 +238,7 @@ ScopeParser.prototype = {
         while (token) {
           //  this.timerPrint("parseScope AFTER lookT: " + token.toString()); 
             //this.dumpToken(token , this.scopes, this.braceNesting);
-            //print('SCOPE:' + token.toString());
+            print('SCOPE:' + token.toString());
             //this.log(token.data);
             if (token.type == 'NAME') {
             //    print('*' + token.data);
@@ -873,8 +873,8 @@ ScopeParser.prototype = {
         }
         
         token = this.ts.nextTok();
-        print('FUNC-BODY:' + JSON.stringify(token,null,4));
-        Seed.quit();
+        print('FUNC-BODY:' + JSON.stringify(token.items,null,4));
+        //Seed.quit();
         //print(token.toString());
         // assert token.getType() == Token.LC;
         //this.braceNesting++;
@@ -882,8 +882,15 @@ ScopeParser.prototype = {
         //token = this.ts.nextTok();
         //print(token.toString());
         var outTS = this.ts;
-        this.ts = new TokenStream(token.items);
-        this.parseScope(fnScope);
+        var _this = this;
+        token.items.forEach(function(tar) {
+            _this.ts = new TokenStream(tar);
+            _this.parseScope(fnScope);
+            
+        }
+        
+        //print(JSON.stringify(this.ts,null,4));
+        //this.parseScope(fnScope);
         this.ts = outTS;
         // now pop it off the stack!!!