X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FTokenReader.js;h=e367849a3ef830e00f081e23e0fcb4b54397edc1;hp=6a71e1925083fbc25e858a282f6dcc623d157b0e;hb=a67931117fc1f532da5016752f7dd3c625ce25d3;hpb=f3b4a6ed633b24553d11767e6d514df748ca6b27 diff --git a/JSDOC/TokenReader.js b/JSDOC/TokenReader.js index 6a71e19..e367849 100644 --- a/JSDOC/TokenReader.js +++ b/JSDOC/TokenReader.js @@ -149,7 +149,7 @@ TokenReader = XObject.define( */ read_newline : function(/**JSDOC.TokenStream*/stream, tokens) { var found = ""; - + var line = this.line; while (!stream.look().eof && Lang.isNewline(stream.look())) { this.line++; found += stream.next(); @@ -164,11 +164,11 @@ TokenReader = XObject.define( } if (this.keepWhite) { var last = tokens.pop(); - if (last.name != "WHIT") { + if (last && last.name != "WHIT") { tokens.push(last); } - tokens.push(new Token(found, "WHIT", "NEWLINE", this.line)); + tokens.push(new Token(found, "WHIT", "NEWLINE", line)); } return true; },