/**
@returns {Boolean} Was the token found?
*/
- read_mlcomment : function(/**JSDOC.TokenStream*/stream, tokens) {
- 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++;
- found += c;
+ public bool read_mlcomment (TokenStream stream, TokenArray tokens)
+ {
+ if (stream.look() != "/") {
+ return false;
+ }
+ if (stream.look(1) != "*") {
+ return false;
+ }
+ var found = stream.next(2);
+ var c = '';
+ var line = this.line;
+ while (!stream.lookEOF() && !(stream.look(-1) == "/" && stream.look(-2) == "*")) {
+ c = stream.next();
+ if (c == "\n") {
+ this.line++;
}
-
- // 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", line));
- return true;
+ found += c;
}
- return false;
+
+ // to start doclet we allow /** or /*** but not /**/ or /****
+ //if (found.length /^\/\*\*([^\/]|\*[^*])/.test(found) && this.keepDocs) {
+ if ((this.keepDocs && found.length > 4 && found.index_of("/**") == 0 && found[3] != "/") {
+ tokens.push(new Token(found, "COMM", "JSDOC", this.line));
+ } else if (this.keepComments) {
+ tokens.push(new Token(found, "COMM", "MULTI_LINE_COMM", line));
+ }
+ return true;
+
},
/**