JSDOC/Template.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 5c6b37a..1b315b0 100644 (file)
@@ -98,7 +98,7 @@ ScopeParser.prototype = {
         
     },
     warn: function(s) {
-        print('****************' + s);
+        //print('****************' + s);
         this.warnings.push(s);
         //println("WARNING:" + htmlescape(s) + "<BR>");
     },
@@ -133,7 +133,7 @@ ScopeParser.prototype = {
         this.mode = 'BUILDING_SYMBOL_TREE';
         this.parseScope(this.globalScope);
         
-        print("---------------END PASS 1 ---------------- ");
+        //print("---------------END PASS 1 ---------------- ");
         
     },
     mungeSymboltree : function()
@@ -195,7 +195,7 @@ ScopeParser.prototype = {
     parseScope : function(scope) // parse a token stream..
     {
         //this.timerPrint("parseScope EnterScope"); 
-        print(">>> ENTER SCOPE" + this.scopes.length);
+        //this.log(">>> ENTER SCOPE" + this.scopes.length);
         var symbol;
         var token;
         
@@ -228,12 +228,15 @@ ScopeParser.prototype = {
                         if (!token) { // can return false at EOF!
                             break;
                         }
-                        if (token.name == "VAR") { // kludge..
+                        if (token.name == "VAR" || token.data == ',') { // kludge..
                             continue;
                         }
                         //this.logR("parseScope GOT VAR  : <B>" + token.toString() + "</B>"); 
                         if (token.type !="NAME") {
-                            print(token.toString());
+                            for(var i = Math.max(this.ts.cursor-10,0); i < this.ts.cursor+1; i++) {
+                                print(this.ts.tokens[i].toString());
+                            }
+                            
                             print( "var without ident");
                             Seed.quit()
                         }
@@ -474,7 +477,7 @@ ScopeParser.prototype = {
             //if (this.ts.nextT()) break;
             
         }
-        print("<<<<<<<EXIT SCOPE ERR?" +this.scopes.length);
+        //print("<<<<<<<EXIT SCOPE ERR?" +this.scopes.length);
     },
 
 
@@ -594,7 +597,7 @@ ScopeParser.prototype = {
                     if (isInObjectLitAr && this.ts.lookTok(0).data == "," && this.ts.lookTok(2).data == ":") {
                         break;
                     }
-                    print(this.ts.lookTok(0).data);
+                    //print(this.ts.lookTok(0).data);
                     if (this.ts.lookTok(0).data == ".") {
                         //skip '.'
                         break;