Project

General

Profile

« Previous | Next » 

Revision ca7ff3f7

Added by LĂ©lio Brun 7 months ago

reformatting

View differences:

src/backends/Ada/misc_printer.ml
3 3
type printer = formatter -> unit
4 4

  
5 5
(** Encapsulate a pretty print function to lower case its result when applied
6
   @param pp the pretty print function
7
   @param fmt the formatter
8
   @param arg the argument of the pp function
9
**)
6
    @param pp the pretty print function @param fmt the formatter @param arg the
7
    argument of the pp function **)
10 8
let pp_lowercase pp fmt =
11 9
  let str = asprintf "%t" pp in
12
  fprintf fmt "%s" (String. lowercase_ascii str)
10
  fprintf fmt "%s" (String.lowercase_ascii str)
13 11

  
14
(** Print a filename by lowercasing the base and appending an extension.
15
   @param extension the extension to append to the package name
16
   @param fmt the formatter
17
   @param pp_name the file base name printer
18
**)
12
(** Print a filename by lowercasing the base and appending an extension. @param
13
    extension the extension to append to the package name @param fmt the
14
    formatter @param pp_name the file base name printer **)
19 15
let pp_filename extension fmt pp_name =
20
  fprintf fmt "%t.%s"
21
    (pp_lowercase pp_name)
22
    extension
16
  fprintf fmt "%t.%s" (pp_lowercase pp_name) extension
23 17

  
24 18
let pp_str str fmt = fprintf fmt "%s" str

Also available in: Unified diff