JSDOC/ScopeParser.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 15 Jul 2010 04:08:53 +0000 (12:08 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 15 Jul 2010 04:08:53 +0000 (12:08 +0800)
JSDOC/ScopeParser.js

index e6c27cf..36f03db 100644 (file)
@@ -187,8 +187,34 @@ ScopeParser.prototype = {
             //println("<B>LOG:</B>" + str + "<BR/>");
     },
 
-
-
+    
+    dumpLine : false,
+    dumpToken: function (tok, scope, brace) {
+        if (this.dumpLine == false) {
+            this.dumpLine = {
+                str : '' +tok.data,
+                scope : scope.length,
+                brace : brace
+            }
+            return;
+        }
+        
+        if (this.dumpLine.scope == scope.length && this.dumpLine.brace == brace) {
+            this.dumpLine.str += ' ' + tok.data;
+            return;
+        }
+        print(
+            (new Array(this.dumpLine.scope)).join("  ") + '|' + 
+            (new Array(brace)).join("  ") + this.dumpLine.str); 
+        
+        
+        this.dumpLine = {
+            str : '' +tok.data,
+            scope : scope.length,
+            brace : brace
+        }
+        
+    },
 
 
 
@@ -214,7 +240,9 @@ ScopeParser.prototype = {
             scopeIndent += '   '; 
         });
         print(scopeIndent + ">> ENTER SCOPE");
-       
+        
+        
+        
         
         token = this.ts.lookTok(1);
         while (token) {