X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FTokenReader.vala;h=b49ffcc7aa7417f8e0ad40b00c7796f26574516f;hb=3c210fbae8a299e248847e55c22441a7e3cae8cb;hp=e3e6096c910a9f55dafc430ae47919137f9412a2;hpb=cec8dfd0781a5265d518eec19209e2aa59a05afc;p=gnome.introspection-doc-generator diff --git a/JSDOC/TokenReader.vala b/JSDOC/TokenReader.vala index e3e6096..b49ffcc 100644 --- a/JSDOC/TokenReader.vala +++ b/JSDOC/TokenReader.vala @@ -288,7 +288,9 @@ namespace JSDOC { if (found === "") { return false; } - //print("WHITE = " + JSON.stringify(found)); + //print("WHITE = " + JSON.stringify(found)); + + if (this.collapseWhite) { found = " "; // this might work better if it was a '\n' ??? } @@ -297,7 +299,7 @@ namespace JSDOC { } return true; - }, + } /** @returns {Boolean} Was the token found? @@ -305,7 +307,7 @@ namespace JSDOC { public bool read_newline (TokenStream stream, TokenArray tokens) var found = ""; var line = this.line; - while (!stream.look().eof && Lang.isNewline(stream.look())) { + while (!stream.lookEOF() && Lang.isNewline(stream.look())) { this.line++; found += stream.next(); } @@ -313,6 +315,11 @@ namespace JSDOC { if (found === "") { return false; } + + // if we found a new line, then we could check if previous character was a ';' - if so we can drop it. + // otherwise generally keep it.. in which case it should reduce our issue with stripping new lines.. + + //this.line++; if (this.collapseWhite) { found = "\n";