JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 538957c..24da7e5 100644 (file)
@@ -426,7 +426,7 @@ ScopeParser.prototype = {
                 
                 case "STRN.DOUBLE_QUOTE": // used for object lit detection..
                 case "STRN.SINGLE_QUOTE":
-                    print('SCOPE-STRING:' + token.toString());
+                  //  print('SCOPE-STRING:' + token.toString());
                     //println("<i>"+token.data+"</i>");
 
                     if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') {
@@ -456,7 +456,7 @@ ScopeParser.prototype = {
                     break;
                 
                 case "NAME.NAME":
-                    print('SCOPE-NAME:' + token.toString());
+                    //print('SCOPE-NAME:' + token.toString());
                     //print("DEAL WITH NAME:");
                     // got identifier..
                     
@@ -523,7 +523,7 @@ ScopeParser.prototype = {
                     if (token.type != 'KEYW') {
                         break;
                     }
-                    print('SCOPE-KEYW:' + token.toString());
+                    //print('SCOPE-KEYW:' + token.toString());
                    // print("Check eval:");
                 
                     symbol = token.data;
@@ -568,7 +568,7 @@ ScopeParser.prototype = {
             //if (this.ts.nextT()) break;
             
         }
-        print("<<< EXIT SCOPE");
+        //print("<<< EXIT SCOPE");
         //print("<<<<<<<EXIT SCOPE ERR?" +this.scopes.length);
     },
 
@@ -616,19 +616,19 @@ ScopeParser.prototype = {
            */ 
            
            //this.dumpToken(token,  this.scopes, this.braceNesting );
-           print('EXP' +  token.toString());
+           //print('EXP' +  token.toString());
             
             
             //println("<i>"+token.data+"</i>");
             //this.log("EXP:" + token.data);
             switch (token.type) {
                 case 'PUNC':
-                    print("EXPR-PUNC:" + token.toString());
+                    //print("EXPR-PUNC:" + token.toString());
                     
                     switch(token.data) {
                          
                         case ';':
-                            print("<< EXIT EXPRESSION");
+                            //print("<< EXIT EXPRESSION");
                             break;
 
                         case ',':
@@ -639,7 +639,7 @@ ScopeParser.prototype = {
                         case '(': //Token.LP:
                         case '{': //Token.LC:
                         case '[': //Token.LB:
-                            print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
+                            //print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
                             //println("<i>"+token.data+"</i>");
                             var curTS = this.ts;
                             if (token.props) {
@@ -683,7 +683,7 @@ ScopeParser.prototype = {
                         case ')': //Token.RP:
                         case ']': //Token.RB:
                         case '}': //Token.RB:
-                            print("<< EXIT EXPRESSION");
+                            //print("<< EXIT EXPRESSION");
                             return;
                            
  
@@ -697,8 +697,8 @@ ScopeParser.prototype = {
                     break;
                     
                 case 'STRN': // used for object lit detection..
-                    if (this.mode == 'BUILDING_SYMBOL_TREE')    
-                        print("EXPR-STR:" + JSON.stringify(token, null, 4));
+                    //if (this.mode == 'BUILDING_SYMBOL_TREE')    
+                        //print("EXPR-STR:" + JSON.stringify(token, null, 4));
                
                      
                     break;
@@ -708,9 +708,9 @@ ScopeParser.prototype = {
                 case 'NAME':
                     if (this.mode == 'BUILDING_SYMBOL_TREE') {
                         
-                        print("EXPR-NAME:" + JSON.stringify(token, null, 4));
+                        //print("EXPR-NAME:" + JSON.stringify(token, null, 4));
                     } else {
-                        print("EXPR-NAME:" + token.toString());
+                        //print("EXPR-NAME:" + token.toString());
                     }
                     symbol = token.data;
                     //print("in NAME = " + token.toString());
@@ -738,8 +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";
+                                //print("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')');
+                                //throw "OOPS";
                             } else {
                                 print("undeclared:" + token.toString())
                             }
@@ -759,8 +759,8 @@ ScopeParser.prototype = {
                     
                     //println("<B>EID</B>");
                 case 'KEYW':   
-                    if (this.mode == 'BUILDING_SYMBOL_TREE') 
-                        print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
+                    //if (this.mode == 'BUILDING_SYMBOL_TREE') 
+                    //    print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
                     if (token.name == "FUNCTION") {
                         
                         this.parseFunctionDeclaration();
@@ -797,13 +797,13 @@ ScopeParser.prototype = {
                         break;
                     } 
                 default:
-                    if (this.mode == 'BUILDING_SYMBOL_TREE') 
-                        print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
+                    //if (this.mode == 'BUILDING_SYMBOL_TREE') 
+                    //    print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
                     break;
             }
             
         }
-        print("<< EXIT EXPRESSION");
+        //print("<< EXIT EXPRESSION");
         this.expN--;
     },
 
@@ -879,14 +879,14 @@ ScopeParser.prototype = {
             fnScope = this.indexedScopes[token.id];
           
         }
-        if (this.mode == 'BUILDING_SYMBOL_TREE') 
-            print('FUNC-PARSE:' + JSON.stringify(token,null,4));
+        //if (this.mode == 'BUILDING_SYMBOL_TREE') 
+        //    print('FUNC-PARSE:' + JSON.stringify(token,null,4));
         // Parse function arguments.
         var args = token.items;
         for (var argpos =0; argpos < args.length; argpos++) {
              
             token = args[argpos][0];
-            print ("FUNC ARGS: " + token.toString())
+            //print ("FUNC ARGS: " + token.toString())
             //assert token.getType() == Token.NAME ||
             //        token.getType() == Token.COMMA;
             if (token.type == 'NAME' && this.mode == 'BUILDING_SYMBOL_TREE') {