From: Alan Knowles Date: Thu, 15 Jul 2010 07:20:46 +0000 (+0800) Subject: JSDOC/TokenReader.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=f3b4a6ed633b24553d11767e6d514df748ca6b27 JSDOC/TokenReader.js --- diff --git a/JSDOC/TokenReader.js b/JSDOC/TokenReader.js index cf732c7..6a71e19 100644 --- a/JSDOC/TokenReader.js +++ b/JSDOC/TokenReader.js @@ -180,6 +180,7 @@ TokenReader = XObject.define( if (stream.look() == "/" && stream.look(1) == "*") { var found = stream.next(2); var c = ''; + var line = this.line; while (!stream.look().eof && !(stream.look(-1) == "/" && stream.look(-2) == "*")) { c = stream.next(); if (c == "\n") this.line++; @@ -188,7 +189,7 @@ TokenReader = XObject.define( // to start doclet we allow /** or /*** but not /**/ or /**** if (/^\/\*\*([^\/]|\*[^*])/.test(found) && this.keepDocs) tokens.push(new Token(found, "COMM", "JSDOC", this.line)); - else if (this.keepComments) tokens.push(new Token(found, "COMM", "MULTI_LINE_COMM", this.line)); + else if (this.keepComments) tokens.push(new Token(found, "COMM", "MULTI_LINE_COMM", line)); return true; } return false;