lib/parser.js
function identifyCommentType(tag) {
    var commentType = null;
    for (var tagName in tag) {
        if (tag.hasOwnProperty(tagName)) {
            switch (tagName) {
                case exports.TAG_NAMES.API:
                case exports.TAG_NAMES.METHOD:
                case exports.TAG_NAMES.METHOD_SIGNATURE:
                case exports.TAG_NAMES.METHOD_NAME:
                case exports.TAG_NAMES.PARAM:
                case exports.TAG_NAMES.RETURN:
                case exports.TAG_NAMES.THROWS:
                    commentType = exports.COMMENT_TYPES.METHOD;
                    break;
                case exports.TAG_NAMES.MODULE:
                case exports.TAG_NAMES.REQUIRES:
                    commentType = exports.COMMENT_TYPES.MODULE;
                    break;
                case exports.TAG_NAMES.CLASS:
                    commentType = exports.COMMENT_TYPES.TYPE;
                    break;
                case exports.TAG_NAMES.VARIABLE_NAME:
                    commentType = exports.COMMENT_TYPES.VARIABLE;
                    break;
            }
        }
    }

    return commentType;
}
function identifyCommentType(tag) {
    var commentType = null;
    for (var tagName in tag) {
        if (tag.hasOwnProperty(tagName)) {
            switch (tagName) {
                case exports.TAG_NAMES.API:
                case exports.TAG_NAMES.METHOD:
                case exports.TAG_NAMES.METHOD_SIGNATURE:
                case exports.TAG_NAMES.METHOD_NAME:
                case exports.TAG_NAMES.PARAM:
                case exports.TAG_NAMES.RETURN:
                case exports.TAG_NAMES.THROWS:
                    commentType = exports.COMMENT_TYPES.METHOD;
                    break;
                case exports.TAG_NAMES.MODULE:
                case exports.TAG_NAMES.REQUIRES:
                    commentType = exports.COMMENT_TYPES.MODULE;
                    break;
                case exports.TAG_NAMES.CLASS:
                    commentType = exports.COMMENT_TYPES.TYPE;
                    break;
                case exports.TAG_NAMES.VARIABLE_NAME:
                    commentType = exports.COMMENT_TYPES.VARIABLE;
                    break;
            }
        }
    }

    return commentType;
}
function identifyCommentType ( tag ) { var commentType = null ; for ( var tagName in tag ) { if ( tag . hasOwnProperty ( tagName ) ) { switch ( tagName ) { case exports . TAG_NAMES . API : case exports . TAG_NAMES . METHOD : case exports . TAG_NAMES . METHOD_SIGNATURE : case exports . TAG_NAMES . METHOD_NAME : case exports . TAG_NAMES . PARAM : case exports . TAG_NAMES . RETURN : case exports . TAG_NAMES . THROWS : commentType = exports . COMMENT_TYPES . METHOD ; break ; case exports . TAG_NAMES . MODULE : case exports . TAG_NAMES . REQUIRES : commentType = exports . COMMENT_TYPES . MODULE ; break ; case exports . TAG_NAMES . CLASS : commentType = exports . COMMENT_TYPES . TYPE ; break ; case exports . TAG_NAMES . VARIABLE_NAME : commentType = exports . COMMENT_TYPES . VARIABLE ; break ; } } } return commentType ; }
Try to identify the type of a comment from a comment tag.
@param tag a tag
@return {String} the type of the comment or null if not identified
@private
Try to identify the type of a comment from a comment tag .