class RBS::Writer
def preserve_empty_line(prev, decl)
def preserve_empty_line(prev, decl) # @type var decl: _Located return unless prev if (_ = decl).respond_to?(:comment) if comment = (_ = decl).comment decl = comment end end prev_loc = prev.location decl_loc = decl.location if prev_loc && decl_loc prev_end_line = prev_loc.end_line start_line = decl_loc.start_line if start_line - prev_end_line > 1 puts end else # When the signature is not constructed by the parser, # it always inserts an empty line. puts end end