Project

General

Profile

Revision 53206908 src/printers.ml

View differences:

src/printers.ml
29 29
and print_dec_ty fmt cty =
30 30
  match (*get_repr_type*) cty with
31 31
  | Tydec_any -> fprintf fmt "Any"
32
  | Tydec_int -> fprintf fmt "int"
33
  | Tydec_real 
34
  | Tydec_float -> fprintf fmt "real"
32
  | Tydec_int -> fprintf fmt "int" 
33
  | Tydec_real -> fprintf fmt "real"
35 34
  | Tydec_bool -> fprintf fmt "bool"
36 35
  | Tydec_clock cty' -> fprintf fmt "%a clock" print_dec_ty cty'
37 36
  | Tydec_const c -> fprintf fmt "%s" c
......
57 56
and pp_const fmt c = 
58 57
  match c with
59 58
    | Const_int i -> pp_print_int fmt i
60
    | Const_real r -> pp_print_string fmt r
61
    | Const_float r -> pp_print_float fmt r
59
    | Const_real (c,e,s) -> pp_print_string fmt s (*if e = 0 then pp_print_int fmt c else if e < 0 then Format.fprintf fmt "%ie%i" c (-e) else Format.fprintf fmt "%ie-%i" c e *)
60
    (* | Const_float r -> pp_print_float fmt r *)
62 61
    | Const_tag  t -> pp_print_string fmt t
63 62
    | Const_array ca -> Format.fprintf fmt "[%a]" (Utils.fprintf_list ~sep:"," pp_const) ca
64 63
    | Const_struct fl -> Format.fprintf fmt "{%a }" (Utils.fprintf_list ~sep:" " pp_struct_const_field) fl
......
131 130

  
132 131
and pp_expr_annot fmt expr_ann =
133 132
  let pp_annot fmt (kwds, ee) =
134
    Format.fprintf fmt "(*! %t: %a *)"
133
    Format.fprintf fmt "(*! %t: %a; *)"
135 134
      (fun fmt -> match kwds with | [] -> assert false | [x] -> Format.pp_print_string fmt x | _ -> Format.fprintf fmt "/%a/" (fprintf_list ~sep:"/" Format.pp_print_string) kwds)
136 135
      pp_eexpr ee
137 136
  in
......
205 204
  | Tydec_any -> fprintf fmt "<any>"
206 205
  | Tydec_int -> fprintf fmt "int"
207 206
  | Tydec_real -> fprintf fmt "real"
208
  | Tydec_float -> fprintf fmt "float"
207
  (* | Tydec_float -> fprintf fmt "float" *)
209 208
  | Tydec_bool -> fprintf fmt "bool"
210 209
  | Tydec_clock t -> fprintf fmt "%a clock" pp_var_type_dec_desc t
211 210
  | Tydec_const t -> fprintf fmt "%s" t

Also available in: Unified diff