JSDOC/Packer.vala
[gnome.introspection-doc-generator] / JSDOC / TokenStream.vala
index bdf7577..b9291a7 100644 (file)
@@ -210,11 +210,11 @@ namespace JSDOC {
                 * @param start {String}  token name or data (eg. '{'
                 * @param stop {String} (Optional) token name or data (eg. '}'
                 */
-               public Gee.ArrayList<Token> balance (string start, string stop = "") throws TokenStreamError 
+               public Gee.ArrayList<Token> balance (string start, string in_stop = "") throws TokenStreamError 
                {
                    
                    // accepts names or "{" etc..
-                   
+                   var stop = in_stop;
                    start = Lang.punc(start) == null ? start : Lang.punc(start);
                    
                    if (stop=="") {
@@ -224,7 +224,7 @@ namespace JSDOC {
                        if (stop == null) {
                                throw new TokenStreamError.ArgumentError("balance called with invalid start/stop : %s",start);
                        }
-                   
+                   debug("START=%s, STOP=%s \n", start,stop);
                    var depth = 0;
                    var got = new Gee.ArrayList<Token>();
                    var started = false;
@@ -339,6 +339,16 @@ namespace JSDOC {
                    print(outs);
                }
                
+               public void dumpAll(string indent)
+               {
+                   for (var i = 0;i < this.tokens.size; i++) {
+                       
+                        this.tokens[i].dump("");
+                   }
+                   
+               }
+               
+               
        }
 }