src/jsdoc.js
function() {
        var line, lines = this.sourceText.split(/\n/mg),
            lineLen = lines.length;

        var inCommenting, curComment, closeCommentIdx;

        for (var i = 0; i < lineLen; ++i) {
            line = lines[i].trim();
            if (line.startsWith('/**')) {
                inCommenting = true;
                curComment = new Comment();
                //Comment closed has to starts with "*/"
            } else if (line.startsWith('*/')) {
                inCommenting = false;
                closeCommentIdx = i;
            } else if (!inCommenting && (1 === i - closeCommentIdx) && /(\bfunction\b\s*?(\w+?)\s*\(([^\(\)]*)\))|((\w+)?\s*(?::|=)\s*function\s*\(([^\(\)]*)\))/.test(line)) {
                curComment.setFunc(RegExp.$2 || RegExp.$5, RegExp.$3 || RegExp.$6);
                if ('string' !== typeof curComment.getTag('ignore')) {
                    this.Comments.push(curComment);
                }
                curComment = null;
            } else if (!inCommenting && (1 === i - closeCommentIdx) && /(\w+)\s*(?::|=)(?!\s*function)/.test(line)) {
                curComment.setAttr(RegExp.$1);
                if ('string' !== typeof curComment.getTag('ignore')) {
                    this.Comments.push(curComment);
                }
                curComment = null;
            } else if (inCommenting) {
                line = line.replace(/^\*/, '').trim();
                if (/^@(\w+)([^\r\n]*)/.test(line)) {
                    curComment.addTag(RegExp.$1, RegExp.$2 || "");
                } else {
                    curComment.addDesc(line);
                }
            }

        } //for

        this._merge();
    }
function() {
        var line, lines = this.sourceText.split(/\n/mg),
            lineLen = lines.length;

        var inCommenting, curComment, closeCommentIdx;

        for (var i = 0; i < lineLen; ++i) {
            line = lines[i].trim();
            if (line.startsWith('/**')) {
                inCommenting = true;
                curComment = new Comment();
                //Comment closed has to starts with "*/"
            } else if (line.startsWith('*/')) {
                inCommenting = false;
                closeCommentIdx = i;
            } else if (!inCommenting && (1 === i - closeCommentIdx) && /(\bfunction\b\s*?(\w+?)\s*\(([^\(\)]*)\))|((\w+)?\s*(?::|=)\s*function\s*\(([^\(\)]*)\))/.test(line)) {
                curComment.setFunc(RegExp.$2 || RegExp.$5, RegExp.$3 || RegExp.$6);
                if ('string' !== typeof curComment.getTag('ignore')) {
                    this.Comments.push(curComment);
                }
                curComment = null;
            } else if (!inCommenting && (1 === i - closeCommentIdx) && /(\w+)\s*(?::|=)(?!\s*function)/.test(line)) {
                curComment.setAttr(RegExp.$1);
                if ('string' !== typeof curComment.getTag('ignore')) {
                    this.Comments.push(curComment);
                }
                curComment = null;
            } else if (inCommenting) {
                line = line.replace(/^\*/, '').trim();
                if (/^@(\w+)([^\r\n]*)/.test(line)) {
                    curComment.addTag(RegExp.$1, RegExp.$2 || "");
                } else {
                    curComment.addDesc(line);
                }
            }

        } //for

        this._merge();
    }
function ( ) { var line , lines = this . sourceText . split ( / \n / mg ) , lineLen = lines . length ; var inCommenting , curComment , closeCommentIdx ; for ( var i = 0 ; i < lineLen ; ++ i ) { line = lines [ i ] . trim ( ) ; if ( line . startsWith ( '/**' ) ) { inCommenting = true ; curComment = new Comment ( ) ; //Comment closed has to starts with "*/" } else if ( line . startsWith ( '*/' ) ) { inCommenting = false ; closeCommentIdx = i ; } else if ( ! inCommenting && ( 1 === i - closeCommentIdx ) && / (\bfunction\b\s*?(\w+?)\s*\(([^\(\)]*)\))|((\w+)?\s*(?::|=)\s*function\s*\(([^\(\)]*)\)) / . test ( line ) ) { curComment . setFunc ( RegExp . $2 || RegExp . $5 , RegExp . $3 || RegExp . $6 ) ; if ( 'string' !== typeof curComment . getTag ( 'ignore' ) ) { this . Comments . push ( curComment ) ; } curComment = null ; } else if ( ! inCommenting && ( 1 === i - closeCommentIdx ) && / (\w+)\s*(?::|=)(?!\s*function) / . test ( line ) ) { curComment . setAttr ( RegExp . $1 ) ; if ( 'string' !== typeof curComment . getTag ( 'ignore' ) ) { this . Comments . push ( curComment ) ; } curComment = null ; } else if ( inCommenting ) { line = line . replace ( / ^\* / , '' ) . trim ( ) ; if ( / ^@(\w+)([^\r\n]*) / . test ( line ) ) { curComment . addTag ( RegExp . $1 , RegExp . $2 || "" ) ; } else { curComment . addDesc ( line ) ; } } } //for this . _merge ( ) ; }
Parse the source text to Comment structure.

@since 0.1.0
@class SourceTextParser
@return {Undefined}
Parse the source text to Comment structure .