function codeAroundComment(token) {
            let currentToken = token;

            do {
                currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(currentToken, token)) {
                return true;
            }

            currentToken = token;
            do {
                currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(token, currentToken)) {
                return true;
            }

            return false;
        }
function codeAroundComment(token) {
            let currentToken = token;

            do {
                currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(currentToken, token)) {
                return true;
            }

            currentToken = token;
            do {
                currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(token, currentToken)) {
                return true;
            }

            return false;
        }
function codeAroundComment ( token ) { let currentToken = token ; do { currentToken = sourceCode . getTokenBefore ( currentToken , { includeComments : true } ) ; } while ( currentToken && astUtils . isCommentToken ( currentToken ) ) ; if ( currentToken && astUtils . isTokenOnSameLine ( currentToken , token ) ) { return true ; } currentToken = token ; do { currentToken = sourceCode . getTokenAfter ( currentToken , { includeComments : true } ) ; } while ( currentToken && astUtils . isCommentToken ( currentToken ) ) ; if ( currentToken && astUtils . isTokenOnSameLine ( token , currentToken ) ) { return true ; } return false ; }
Returns whether or not comments are on lines starting with or ending with code
@param {token} token The comment token to check.
@returns {boolean} True if the comment is not alone.
Returns whether or not comments are on lines starting with or ending with code
Check if a comment is on a line