module Prism

def parse_comments(code, **options)

Mirror the Prism.parse_comments API by using the serialization API.
def parse_comments(code, **options)
  LibRubyParser::PrismBuffer.with do |buffer|
    LibRubyParser.pm_serialize_parse_comments(buffer.pointer, code, code.bytesize, dump_options(options))
    source = Source.new(code)
    loader = Serialize::Loader.new(source, buffer.read)
    loader.load_header
    loader.load_encoding
    loader.load_start_line
    loader.load_comments
  end
end