JSDOC/Packer.vala
[gnome.introspection-doc-generator] / JSDOC / TokenStream.vala
index ff65a19..dff38f4 100644 (file)
@@ -236,7 +236,7 @@ namespace JSDOC {
                    Token token;
                    
                    while (null != (token = this.look(1,false))) {
-                               debug(token.asString());
+                               debug("BALANCE: %d %s " , this.cursor,  token.asString());
                        if (token.is(start)) {
                      //      Seed.print("balance: START : " + depth + " " + token.data);
                            depth++;
@@ -249,10 +249,14 @@ namespace JSDOC {
                        
                        if (token.is(stop)) {
                            depth--;
-                       //    Seed.print("balance: STOP: "  + depth + " " + token.data);
+                           
+                               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;
                                }
+                               
                        }
                        if (null == this.next()) {
                                break;