1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
Index: jsdoc-toolkit-2.4.0+dfsg/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js
===================================================================
--- jsdoc-toolkit-2.4.0+dfsg.orig/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js
+++ jsdoc-toolkit-2.4.0+dfsg/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js
@@ -13,31 +13,31 @@ JSDOC.TokenReader = function() {
@type {JSDOC.Token[]}
*/
JSDOC.TokenReader.prototype.tokenize = function(/**JSDOC.TextStream*/stream) {
- var tokens = [];
- /**@ignore*/ tokens.last = function() { return tokens[tokens.length-1]; }
- /**@ignore*/ tokens.lastSym = function() {
- for (var i = tokens.length-1; i >= 0; i--) {
- if (!(tokens[i].is("WHIT") || tokens[i].is("COMM"))) return tokens[i];
- }
+ var tokens = [];
+ /**@ignore*/ tokens.last = function() { return tokens[tokens.length-1]; };
+ /**@ignore*/ tokens.lastSym = function() {
+ for (var i = tokens.length-1; i >= 0; i--) {
+ if (!(tokens[i].is("WHIT") || tokens[i].is("COMM"))) return tokens[i];
}
+ };
- while (!stream.look().eof) {
- if (this.read_mlcomment(stream, tokens)) continue;
- if (this.read_slcomment(stream, tokens)) continue;
- if (this.read_dbquote(stream, tokens)) continue;
- if (this.read_snquote(stream, tokens)) continue;
- if (this.read_regx(stream, tokens)) continue;
- if (this.read_numb(stream, tokens)) continue;
- if (this.read_punc(stream, tokens)) continue;
- if (this.read_newline(stream, tokens)) continue;
- if (this.read_space(stream, tokens)) continue;
- if (this.read_word(stream, tokens)) continue;
-
- // if execution reaches here then an error has happened
- tokens.push(new JSDOC.Token(stream.next(), "TOKN", "UNKNOWN_TOKEN"));
- }
- return tokens;
-}
+ while (!stream.look().eof) {
+ if (this.read_mlcomment(stream, tokens)) continue;
+ if (this.read_slcomment(stream, tokens)) continue;
+ if (this.read_dbquote(stream, tokens)) continue;
+ if (this.read_snquote(stream, tokens)) continue;
+ if (this.read_regx(stream, tokens)) continue;
+ if (this.read_numb(stream, tokens)) continue;
+ if (this.read_punc(stream, tokens)) continue;
+ if (this.read_newline(stream, tokens)) continue;
+ if (this.read_space(stream, tokens)) continue;
+ if (this.read_word(stream, tokens)) continue;
+
+ // if execution reaches here then an error has happened
+ tokens.push(new JSDOC.Token(stream.next(), "TOKN", "UNKNOWN_TOKEN"));
+ }
+ return tokens;
+};
/**
@returns {Boolean} Was the token found?
|