JSDOC/ScopeParser.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 15 Jul 2010 05:48:05 +0000 (13:48 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 15 Jul 2010 05:48:05 +0000 (13:48 +0800)
JSDOC/ScopeParser.js

index eccc7a5..d93f771 100644 (file)
@@ -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);
@@ -246,7 +246,7 @@ 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());
                     var vstart = this.ts.cursor +1;
                     
                     //this.log("parseScope GOT VAR/CONST : " + token.toString()); 
@@ -313,6 +313,7 @@ ScopeParser.prototype = {
                     
                     break;
                 case "KEYW.FUNCTION":
+                    print('SCOPE-FUNC:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                      var bn = this.braceNesting;
                     this.parseFunctionDeclaration();
@@ -320,13 +321,14 @@ ScopeParser.prototype = {
                     break;
 
                 case "PUNC.LEFT_CURLY": // {
+                    print('SCOPE-CURLY:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                     isObjectLitAr.push(false);
                     this.braceNesting++;
                     
                     //print(">>>>>> OBJLIT PUSH(false)" + this.braceNesting);
                     break;
-
+/*
                 case "PUNC.RIGHT_CURLY": // }
                     //println("<i>"+token.data+"</i>");
                     this.braceNesting--;
@@ -346,8 +348,9 @@ ScopeParser.prototype = {
                         return;
                     }
                     break;
-
+*/
                 case "KEYW.WITH":
+                    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
@@ -361,6 +364,7 @@ ScopeParser.prototype = {
                     break;
 
                 case "KEYW.CATCH":
+                    print('SCOPE-CATCH:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                     this.parseCatch();
                     break;
@@ -375,6 +379,7 @@ ScopeParser.prototype = {
                 
                 case "STRN.DOUBLE_QUOTE": // used for object lit detection..
                 case "STRN.SINGLE_QUOTE":
+                    print('SCOPE-STRING:' + token.toString());
                     //println("<i>"+token.data+"</i>");
                     if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') {
                         // then we are in an object lit.. -> we need to flag the brace as such...
@@ -403,7 +408,7 @@ ScopeParser.prototype = {
                     break;
                 
                 case "NAME.NAME":
-                
+                    print('SCOPE-NAME:' + token.toString());
                     //print("DEAL WITH NAME:");
                     // got identifier..
                     
@@ -470,6 +475,7 @@ ScopeParser.prototype = {
                     if (token.type != 'KEYW') {
                         break;
                     }
+                    print('SCOPE-KEYW:' + token.toString());
                    // print("Check eval:");
                 
                     symbol = token.data;