From be53c0dcfcc654279b4887bd5442c009a20b7cc0 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 15 Jul 2010 15:11:08 +0800 Subject: [PATCH] JSDOC/TokenReader.js --- JSDOC/TokenReader.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/JSDOC/TokenReader.js b/JSDOC/TokenReader.js index 173e67c..7892695 100644 --- a/JSDOC/TokenReader.js +++ b/JSDOC/TokenReader.js @@ -154,24 +154,23 @@ TokenReader = XObject.define( this.line++; found += stream.next(); } - this.line++; + 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; }, /** -- 2.39.2