JSDOC/ScopeParser.js
authoralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 04:35:53 +0000 (12:35 +0800)
committeralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 04:35:53 +0000 (12:35 +0800)
JSDOC/ScopeParser.js

index 7a40d46..3ffbe29 100644 (file)
@@ -337,7 +337,7 @@ ScopeParser.prototype = {
                 
                 
                 default: 
-                    if (token.type != "NAME") {
+                    if ((token.type != "NAME") && (token.type != "KEYW"){
                         break;
                     }
                     // got identifier..
@@ -376,7 +376,7 @@ ScopeParser.prototype = {
 
                         if (symbol == "eval") {
                             // look back one and see if we can find a comment!!!
-                            if (this.ts.look(-1).isDoc()) {
+                            if (this.ts.look(-1).type == "COMM") {
                                 // look for eval:var:noreplace\n
                                 var _t = this;
                                 this.ts.look(-1).data.replace(/eval:var:([a-z_]+)/ig, function(m, a) {
@@ -413,7 +413,7 @@ ScopeParser.prototype = {
                         
                         if (identifier == false) {
 // BUG!find out where builtin is defined...
-                            if (symbol.length <= 3 && JSDOC.Scope.builtin.indexOf(symbol) < 0) {
+                            if (symbol.length <= 3 &&  Scope.builtin.indexOf(symbol) < 0) {
                                 // Here, we found an undeclared and un-namespaced symbol that is
                                 // 3 characters or less in length. Declare it in the global scope.
                                 // We don't need to declare longer symbols since they won't cause
@@ -430,18 +430,13 @@ ScopeParser.prototype = {
                        
                     }
                     break;
-                //case Script.TOKsemicolon':
-                    //println("<br/>");
-                //    break;
-                default:
-                    //println("<i>"+token.data+"</i>");
-                    break;
+                
                 
             } // end switch
             
             
             //this.timerPrint("parseScope TOK : " + token.toString()); 
-            token = this.ts.nextT();
+            token = this.ts.next();
             //if (this.ts.nextT()) break;
             
         }