JSDOC/ScopeParser.js
authoralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 08:18:49 +0000 (16:18 +0800)
committeralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 08:18:49 +0000 (16:18 +0800)
JSDOC/ScopeParser.js

index 13cb1ab..5a46f4b 100644 (file)
@@ -237,7 +237,7 @@ ScopeParser.prototype = {
                                 scope.declareIdentifier(token.data, token);
                             } else {
                                 token.identifier = identifier;
-                                this.warn("The variable " + token.data  + ' (line:' + token.line + ")  has already been declared in the same scope...");
+                                this.warn("(SCOPE) The variable " + token.data  + ' (line:' + token.line + ")  has already been declared in the same scope...");
                             }
                         }
 
@@ -271,6 +271,7 @@ ScopeParser.prototype = {
                 case "KEYW.LEFT_CURLY": // {
                     //println("<i>"+token.data+"</i>");
                     isObjectLitAr.push(false);
+                    print(">>>>>> OBJLIT PUSH(false)");
                     this.braceNesting++;
                     break;
 
@@ -278,6 +279,7 @@ ScopeParser.prototype = {
                     //println("<i>"+token.data+"</i>");
                     this.braceNesting--;
                     isObjectLitAr.pop();
+                    print(">>>>>> OBJLIT POP(false)");
                         //assert braceNesting >= scope.getBraceNesting();
                     if (this.braceNesting == scope.braceN) {
                         var ls = this.scopes.pop();
@@ -319,6 +321,7 @@ ScopeParser.prototype = {
                         // then we are in an object lit.. -> we need to flag the brace as such...
                         isObjectLitAr.pop();
                         isObjectLitAr.push(true);
+                        print(">>>>>> OBJLIT PUSH(true)");
                     }
                     isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
                     
@@ -349,6 +352,7 @@ ScopeParser.prototype = {
                     if ((this.ts.lookTok(-1).data == "{") && (this.ts.lookTok(1).data == ":")) {
                         isObjectLitAr.pop();
                         isObjectLitAr.push(true);
+                        print(">>>>>> OBJLIT PUSH(true)");
                         //println("<i>"+token.data+"</i>");
                         break;
                     }