X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FTokenStream.vala;h=6c6f8adc087eb3b5bedfba16f74803eb2f658328;hb=35ddfbdfc0fb33aab65d6722db3948ca210ede7f;hp=804c04c30370989180b49cb32cdb54410f07e3c4;hpb=bf842e1c2b72676ebf06f65608f8193323140499;p=gnome.introspection-doc-generator diff --git a/JSDOC/TokenStream.vala b/JSDOC/TokenStream.vala index 804c04c..6c6f8ad 100644 --- a/JSDOC/TokenStream.vala +++ b/JSDOC/TokenStream.vala @@ -28,7 +28,10 @@ namespace JSDOC { this.rewind(); } - + public Gee.ArrayList toArray() + { + return this.tokens; + } public void rewind() { @@ -210,11 +213,11 @@ namespace JSDOC { * @param start {String} token name or data (eg. '{' * @param stop {String} (Optional) token name or data (eg. '}' */ - public Gee.ArrayList balance (string start, string stop = "") throws TokenStreamError + public Gee.ArrayList 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 +227,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); + debug("START=%s, STOP=%s \n", start,stop); var depth = 0; var got = new Gee.ArrayList(); var started = false; @@ -233,6 +236,7 @@ namespace JSDOC { Token token; while (null != (token = this.look(1,false))) { + debug("BALANCE: " + token.asString()); if (token.is(start)) { // Seed.print("balance: START : " + depth + " " + token.data); depth++;