Project

General

Profile

Revision 6560bb94 src/printers.ml

View differences:

src/printers.ml
118 118
let pp_node_args = fprintf_list ~sep:"; " pp_node_var 
119 119

  
120 120
let pp_var_type_dec fmt ty =
121
  let rec pp_var_type_dec_desc fmt tdesc =
121
  let rec pp_var_struct_type_field fmt (label, tdesc) =
122
    fprintf fmt "%a : %a" pp_var_type_dec_desc tdesc pp_print_string label
123
  and pp_var_type_dec_desc fmt tdesc =
122 124
  match tdesc with 
123 125
    | Tydec_any -> fprintf fmt "<any>"
124 126
    | Tydec_int -> fprintf fmt "int"
......
128 130
    | Tydec_clock t -> fprintf fmt "%a clock" pp_var_type_dec_desc t
129 131
    | Tydec_const t -> fprintf fmt "%s" t
130 132
    | Tydec_enum id_list -> fprintf fmt "enum {%a }" (fprintf_list ~sep:", " pp_print_string) id_list
133
    | Tydec_struct f_list -> fprintf fmt "struct {%a }" (fprintf_list ~sep:"; " pp_var_struct_type_field) f_list
131 134
    | Tydec_array (s, t) -> fprintf fmt "%a^%a" pp_var_type_dec_desc t Dimension.pp_dimension s
132 135
in pp_var_type_dec_desc fmt ty.ty_dec_desc
133 136

  

Also available in: Unified diff