X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FTokenReader.js;h=1e27e5ad73c98d7ada936b878dd2fcaccdf4a7dd;hb=204c3e6dca7d878b60d2ce67646d7cded1f32cdf;hp=641b9b124f28a082c89b236605533dd555c1738b;hpb=a55f131f2bb303f52755fdc95cf8d52801ae0114;p=gnome.introspection-doc-generator diff --git a/JSDOC/TokenReader.js b/JSDOC/TokenReader.js index 641b9b1..1e27e5a 100644 --- a/JSDOC/TokenReader.js +++ b/JSDOC/TokenReader.js @@ -131,17 +131,18 @@ TokenReader = XObject.define( var found = ""; while (!stream.look().eof && Lang.isSpace(stream.look())) { + if (Lang.isNewLine()) break; found += stream.next(); } if (found === "") { return false; } - else { - if (this.collapseWhite) found = " "; - if (this.keepWhite) tokens.push(new Token(found, "WHIT", "SPACE", this.line)); - return true; - } + print("WHITE = " + JSON.stringify(found)); + if (this.collapseWhite) found = " "; + if (this.keepWhite) tokens.push(new Token(found, "WHIT", "SPACE", this.line)); + return true; + }, /** @@ -158,21 +159,19 @@ TokenReader = XObject.define( if (found === "") { return false; } - else { - if (this.collapseWhite) { - found = "\n"; - } - if (this.keepWhite) { - var last = tokens.pop(); - if (last.name != "WHIT") { - tokens.push(last); - } - - - tokens.push(new Token(found, "WHIT", "NEWLINE", this.line)); + //this.line++; + if (this.collapseWhite) { + found = "\n"; + } + if (this.keepWhite) { + var last = tokens.pop(); + if (last.name != "WHIT") { + tokens.push(last); } - return true; + + tokens.push(new Token(found, "WHIT", "NEWLINE", this.line)); } + return true; }, /**