src/utils/comment.js
function(ast) {
    if (ast) {
        try {
            var doc = reader.parse(ast.lines);
        } catch(e) {
            console.error(e.stack);
            console.log('Source : \n* ' + ast.lines.join('\n* '));
            return;
        }
        this.summary = doc.summary;
        this.tags = {};
        this.annotations = [];
        for(var i = 0; i < doc.body.length; i++) {
            var child = doc.body[i];
            if (child.kind === 'annotation') {
                this.annotations.push(child);
            } else {
                var name = child.kind.toLowerCase();
                if (typeof child.name === 'string') {
                    name = child.name.toLowerCase();
                }
                if (!this.tags.hasOwnProperty(name)) {
                    this.tags[name] = [];
                }
                this.tags[name].push(child);
            }
        }
    }
}
function(ast) {
    if (ast) {
        try {
            var doc = reader.parse(ast.lines);
        } catch(e) {
            console.error(e.stack);
            console.log('Source : \n* ' + ast.lines.join('\n* '));
            return;
        }
        this.summary = doc.summary;
        this.tags = {};
        this.annotations = [];
        for(var i = 0; i < doc.body.length; i++) {
            var child = doc.body[i];
            if (child.kind === 'annotation') {
                this.annotations.push(child);
            } else {
                var name = child.kind.toLowerCase();
                if (typeof child.name === 'string') {
                    name = child.name.toLowerCase();
                }
                if (!this.tags.hasOwnProperty(name)) {
                    this.tags[name] = [];
                }
                this.tags[name].push(child);
            }
        }
    }
}
function ( ast ) { if ( ast ) { try { var doc = reader . parse ( ast . lines ) ; } catch ( e ) { console . error ( e . stack ) ; console . log ( 'Source : \n* ' + ast . lines . join ( '\n* ' ) ) ; return ; } this . summary = doc . summary ; this . tags = { } ; this . annotations = [ ] ; for ( var i = 0 ; i < doc . body . length ; i ++ ) { var child = doc . body [ i ] ; if ( child . kind === 'annotation' ) { this . annotations . push ( child ) ; } else { var name = child . kind . toLowerCase ( ) ; if ( typeof child . name === 'string' ) { name = child . name . toLowerCase ( ) ; } if ( ! this . tags . hasOwnProperty ( name ) ) { this . tags [ name ] = [ ] ; } this . tags [ name ] . push ( child ) ; } } } }
Initialize a comment declaration
@public
@constructor comment
@property {String} summary
@property {tag[]} tags
@property {annotation[]} annotations
Initialize a comment declaration