Project

General

Profile

Revision aa223e69 src/c_backend.ml

View differences:

src/c_backend.ml
208 208
(* Prints a constant value *)
209 209
let rec pp_c_const fmt c =
210 210
  match c with
211
    | Const_int i    -> pp_print_int fmt i
212
    | Const_real r   -> pp_print_string fmt r
213
    | Const_float r  -> pp_print_float fmt r
214
    | Const_tag t    -> pp_c_tag fmt t
215
    | Const_array ca -> fprintf fmt "{%a}" (Utils.fprintf_list ~sep:"," pp_c_const) ca
211
    | Const_int i     -> pp_print_int fmt i
212
    | Const_real r    -> pp_print_string fmt r
213
    | Const_float r   -> pp_print_float fmt r
214
    | Const_tag t     -> pp_c_tag fmt t
215
    | Const_array ca  -> fprintf fmt "{%a }" (Utils.fprintf_list ~sep:", " pp_c_const) ca
216
    | Const_struct fl -> fprintf fmt "{%a }" (Utils.fprintf_list ~sep:", " (fun fmt (f, c) -> pp_c_const fmt c)) fl
216 217

  
217 218
(* Prints a value expression [v], with internal function calls only.
218 219
   [pp_var] is a printer for variables (typically [pp_c_var_read]),

Also available in: Unified diff