JSDOC/CompressWhite.vala
[gnome.introspection-doc-generator] / JSDOC / TokenStream.vala
index 10a8b98..e606091 100644 (file)
@@ -236,7 +236,7 @@ namespace JSDOC {
                    Token token;
                    
                    while (null != (token = this.look(1,false))) {
-                               debug("BALANCE: " + token.asString());
+                               debug("BALANCE: %d %s " , this.cursor,  token.asString());
                        if (token.is(start)) {
                      //      Seed.print("balance: START : " + depth + " " + token.data);
                            depth++;
@@ -252,6 +252,8 @@ namespace JSDOC {
                            
                                print("balance (%d): STOP: %s\n" ,  depth ,  token.data);
                            if (depth < 1) {
+                                   this.next(); // shift cursor to eat closer...
+                                       print("returning got %d\n", got.size);
                                        return got;
                                }
                                
@@ -353,7 +355,14 @@ namespace JSDOC {
                    }
                    
                }
-               
+               public void dumpAllFlat()
+               {
+                   for (var i = 0;i < this.tokens.size; i++) {
+                       
+                        print("%d: %s\n", i, this.tokens[i].asString());
+                   }
+                   
+               }
                
        }
 }