mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
don't use each() to iterate over an array, and remove another unnecessary semicolon
this fixes a JSHint error that cannot be suppressed.
This commit is contained in:
parent
9ade2a2fe2
commit
dac7203816
@ -269,8 +269,8 @@ function toTags(docletSrc) {
|
|||||||
docletSrc = unwrap(docletSrc);
|
docletSrc = unwrap(docletSrc);
|
||||||
tagSrcs = split(docletSrc);
|
tagSrcs = split(docletSrc);
|
||||||
|
|
||||||
for each(tagSrc in tagSrcs) {
|
for (var i = 0, l = tagSrcs.length; i < l; i++) {
|
||||||
tags.push( {title: tagSrc.title, text: tagSrc.text} );
|
tags.push( {title: tagSrcs[i].title, text: tagSrcs[i].text} );
|
||||||
}
|
}
|
||||||
|
|
||||||
return tags;
|
return tags;
|
||||||
|
|||||||
@ -321,12 +321,18 @@ exports.Parser.prototype.resolveEnum = function(e) {
|
|||||||
/** @private */
|
/** @private */
|
||||||
function visitNode(node) {
|
function visitNode(node) {
|
||||||
var e,
|
var e,
|
||||||
commentSrc;
|
nodeComments,
|
||||||
|
comment,
|
||||||
|
commentSrc,
|
||||||
|
i,
|
||||||
|
l;
|
||||||
|
|
||||||
// look for stand-alone doc comments
|
// look for stand-alone doc comments
|
||||||
if (node.type === Token.SCRIPT && node.comments) {
|
if (node.type === Token.SCRIPT && node.comments) {
|
||||||
// note: ALL comments are seen in this block...
|
// note: ALL comments are seen in this block...
|
||||||
for each(var comment in node.comments.toArray()) {
|
nodeComments = node.comments.toArray();
|
||||||
|
for (i = 0, l = nodeComments.length; i < l; i++) {
|
||||||
|
comment = nodeComments[i];
|
||||||
if (comment.commentType !== Token.CommentType.JSDOC) {
|
if (comment.commentType !== Token.CommentType.JSDOC) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -578,7 +584,7 @@ function nodeToString(node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return '' + str;
|
return '' + str;
|
||||||
};
|
}
|
||||||
|
|
||||||
/** @private
|
/** @private
|
||||||
@memberof module:src/parser.Parser
|
@memberof module:src/parser.Parser
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user