From 3c210fbae8a299e248847e55c22441a7e3cae8cb Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 15 Sep 2015 17:13:35 +0800 Subject: [PATCH] JSDOC/TokenReader.vala --- JSDOC/TokenReader.vala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/JSDOC/TokenReader.vala b/JSDOC/TokenReader.vala index bbdc179..b49ffcc 100644 --- a/JSDOC/TokenReader.vala +++ b/JSDOC/TokenReader.vala @@ -290,9 +290,7 @@ namespace JSDOC { } //print("WHITE = " + JSON.stringify(found)); - // 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.. - + if (this.collapseWhite) { found = " "; // this might work better if it was a '\n' ??? } @@ -301,7 +299,7 @@ namespace JSDOC { } return true; - }, + } /** @returns {Boolean} Was the token found? @@ -309,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(); } @@ -317,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"; -- 2.39.2