code: function parse (pattern, comment) {
    const match = pattern.exec(comment)
    if (match == null) {
      return null
    }
  
    const type = match[1]
    const rules = (match[2] || '')
      .split(',')
      .map(s => s.trim())
      .filter(Boolean)
  
    return { type, rules }
  }
docs: Parse a given comment.
  @param {RegExp} pattern The RegExp pattern to parse.
  @param {string} comment The comment value to parse.
  @returns {({type:string,rules:string[]})|null} The parsing result.