You don't need a special package for this. Emacs offers such a feature out of the box. And as @ais indicated in a comment, it is available to use for any mode.
See the Elisp manual, node Syntax Class Table:
Comment starters: ‘<’
Comment enders: ‘>’
Characters used in various languages to delimit comments. Human
text has no comment characters. In Lisp, the semicolon (‘;’)
starts a comment and a newline or formfeed ends one.
Generic comment delimiters: ‘!’
Characters that start or end a special kind of comment. _Any_
generic comment delimiter matches _any_ generic comment delimiter,
but they cannot match a comment starter or comment ender; generic
comment delimiters can only match each other.
This syntax class is primarily meant for use with the
‘syntax-table’ text property (*note Syntax Properties::). You can
mark any range of characters as forming a comment, by giving the
first and last characters of the range ‘syntax-table’ properties
identifying them as generic comment delimiters.
and more particularly node Syntax Flags.
(See how it is done for C code, for example, by checking the Lisp sources.)