X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FTokenStream.js;h=7b3328f3eefe541c02d2d850d23810080890d27e;hp=5ee83229c90de1cca8028624c45c472164f0ab2d;hb=759466942f163998373b165f409fd9cfaaa9910f;hpb=5cc6611846f509ae56acb6b290561b12179111ff diff --git a/JSDOC/TokenStream.js b/JSDOC/TokenStream.js index 5ee8322..7b3328f 100644 --- a/JSDOC/TokenStream.js +++ b/JSDOC/TokenStream.js @@ -138,6 +138,7 @@ TokenStream = XObject.define( /** * @return {Token|null} + * next token (with white space) */ @@ -186,18 +187,18 @@ TokenStream = XObject.define( balance : function(/**String*/start, /**String*/stop) { - start = typeof(Lang.punc(start)) == 'undefined' ? Lang.punc(start) : start; + start = typeof(Lang.punc(start)) == 'undefined' ? start : Lang.punc(start); if (!stop) stop = Lang.matching(start); var depth = 0; var got = []; var started = false; - Seed.print("START:" + start); - Seed.print("STOP:" + stop); + //Seed.print("START:" + start); + //Seed.print("STOP:" + stop); while ((token = this.look())) { if (token.is(start)) { - Seed.print("balance: START : " + depth + " " + token.data); + // Seed.print("balance: START : " + depth + " " + token.data); depth++; started = true; } @@ -208,8 +209,8 @@ TokenStream = XObject.define( if (token.is(stop)) { depth--; - Seed.print("balance: STOP: " + depth + " " + token.data); - if (depth < 0) return got; + // Seed.print("balance: STOP: " + depth + " " + token.data); + if (depth < 1) return got; } if (!this.next()) break; }