JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 4479462..538957c 100644 (file)
@@ -234,7 +234,7 @@ ScopeParser.prototype = {
         //this.scopes.forEach(function() {
         //    scopeIndent += '   '; 
         //});
-        print(">> ENTER SCOPE");
+        //print(">> ENTER SCOPE");
         
         
         
@@ -243,7 +243,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);
@@ -251,14 +251,14 @@ ScopeParser.prototype = {
             switch(token.type + '.' + token.name) {
                 case "KEYW.VAR":
                 case "KEYW.CONST": // not really relivant as it's only mozzy that does this.
-                    print('SCOPE-VAR:' + token.toString());
+                    //print('SCOPE-VAR:' + token.toString());
                     var vstart = this.ts.cursor +1;
                     
                     //this.log("parseScope GOT VAR/CONST : " + token.toString()); 
                     while (true) {
                         token = this.ts.nextTok();
                         //!this.debug|| print( token.toString());
-                        print('SCOPE-VAR-VAL:' + token.toString());
+                        //print('SCOPE-VAR-VAL:' + token.toString());
                         if (!token) { // can return false at EOF!
                             break;
                         }
@@ -318,8 +318,8 @@ ScopeParser.prototype = {
                     
                     break;
                 case "KEYW.FUNCTION":
-                    if (this.mode == 'BUILDING_SYMBOL_TREE') 
-                        print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
+                    //if (this.mode == 'BUILDING_SYMBOL_TREE') 
+                    //    print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
                     //println("<i>"+token.data+"</i>");
                      var bn = this.braceNesting;
                     this.parseFunctionDeclaration();
@@ -328,7 +328,7 @@ ScopeParser.prototype = {
 
                 case "PUNC.LEFT_CURLY": // {
                 case "PUNC.LEFT_PAREN": // (    
-                    print('SCOPE-CURLY/PAREN:' + token.toString());
+                    //print('SCOPE-CURLY/PAREN:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                     var curTS = this.ts;
                     if (token.props) {
@@ -374,7 +374,7 @@ ScopeParser.prototype = {
                     break;
 
                 case "PUNC.RIGHT_CURLY": // }
-                    print("<< EXIT SCOPE");
+                    //print("<< EXIT SCOPE");
                     return;
                 /*
                     //println("<i>"+token.data+"</i>");
@@ -397,7 +397,7 @@ ScopeParser.prototype = {
                     break;
 */
                 case "KEYW.WITH":
-                    print('SCOPE-WITH:' + token.toString());
+                    //print('SCOPE-WITH:' + token.toString());
                     //println("<i>"+token.data+"</i>");   
                     if (this.mode == "BUILDING_SYMBOL_TREE") {
                         // Inside a 'with' block, it is impossible to figure out
@@ -411,7 +411,7 @@ ScopeParser.prototype = {
                     break;
 
                 case "KEYW.CATCH":
-                    print('SCOPE-CATCH:' + token.toString());
+                    //print('SCOPE-CATCH:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                     this.parseCatch();
                     break;
@@ -711,7 +711,7 @@ ScopeParser.prototype = {
                         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());
@@ -819,10 +819,10 @@ ScopeParser.prototype = {
         //assert token.getType() == Token.CATCH;
         token = this.ts.nextTok();
         //assert token.getType() == Token.LP; (
-        token = this.ts.nextTok();
+        //token = this.ts.nextTok();
         //assert token.getType() == Token.NAME;
         
-        symbol = token.data;
+        symbol = token.items[0].data;
         currentScope = this.scopes[this.scopes.length-1];
 
         if (this.mode == 'BUILDING_SYMBOL_TREE') {