function isComment(token) {
  return (
    token != null &&
    (token.type === 'Block' ||
      token.type === 'Line' ||
      token.type === 'Shebang' ||
      (typeof token.type ===
        'string' /* Although acorn supports new tokens, espree may not yet support new tokens.*/ &&
        token.type.endsWith('Comment')))
  )
}
Check whether the given token is a comment.
@param {Token|undefined|null} token The token to check.
@returns {boolean} `true` if the token is a comment.