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:
Jeff Williams 2012-07-03 19:07:19 -07:00
parent 9ade2a2fe2
commit dac7203816
2 changed files with 11 additions and 5 deletions

View File

@ -269,8 +269,8 @@ function toTags(docletSrc) {
docletSrc = unwrap(docletSrc);
tagSrcs = split(docletSrc);
for each(tagSrc in tagSrcs) {
tags.push( {title: tagSrc.title, text: tagSrc.text} );
for (var i = 0, l = tagSrcs.length; i < l; i++) {
tags.push( {title: tagSrcs[i].title, text: tagSrcs[i].text} );
}
return tags;

View File

@ -321,12 +321,18 @@ exports.Parser.prototype.resolveEnum = function(e) {
/** @private */
function visitNode(node) {
var e,
commentSrc;
nodeComments,
comment,
commentSrc,
i,
l;
// look for stand-alone doc comments
if (node.type === Token.SCRIPT && node.comments) {
// 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) {
continue;
}
@ -578,7 +584,7 @@ function nodeToString(node) {
}
return '' + str;
};
}
/** @private
@memberof module:src/parser.Parser