Project

General

Profile

Revision 1f15a1b9

View differences:

src/backends/VHDL/vhdl_ast_deriving.ml
460 460
             ((__0 ()) fmt) a0;
461 461
        | Cst { value = avalue; unit_name = aunit_name } ->
462 462
             ((__1 ()) fmt) avalue;
463
             ((function
463
             (function
464 464
                | None  -> Format.pp_print_string fmt ""
465 465
                | Some x ->
466
                     ((__2 ()) fmt) x)) aunit_name;
466
                    Format.fprintf fmt " ";
467
                    ((__2 ()) fmt) x) aunit_name;
467 468
        | Op { id = aid; args = aargs } ->
468 469
            (match aargs with
469 470
            | [] -> (Format.fprintf fmt "%s") aid;
......
2948 2949
            (match alabel with
2949 2950
              | NoName -> Format.fprintf fmt "";
2950 2951
              | _ -> (((__0 ()) fmt) alabel;
2951
                     Format.fprintf fmt ":@ ")
2952
                     Format.fprintf fmt ": ")
2952 2953
            );
2953 2954
            ((__1 ()) fmt) alhs;
2954
            Format.fprintf fmt "@ :=@ ";
2955
            Format.fprintf fmt " := ";
2955 2956
            ((__2 ()) fmt) arhs;
2956 2957
(* TODO: Check
2957 2958
            (Format.fprintf fmt "@[<2>VarAssign {@,";
......
2984 2985
                     fun x  ->
2985 2986
                       if sep then Format.fprintf fmt "";
2986 2987
                        ((__5 ()) fmt) x;
2987
                        Format.fprintf fmt ";";
2988 2988
                        true) false x);
2989 2989
            Format.fprintf fmt "@]@]")) arhs;
2990 2990
        | If { label = alabel; if_cases = aif_cases; default = adefault } ->
......
3147 3147
  ((let open! Ppx_deriving_runtime in
3148 3148
      fun fmt  ->
3149 3149
        fun x  ->
3150
                Format.fprintf fmt "@;<0 2>when ";
3150
                Format.fprintf fmt "@;@[<v 2>when ";
3151 3151
            ((fun x  ->
3152 3152
                ignore
3153 3153
                  (List.fold_left
......
3157 3157
                          ((__0 ()) fmt) x;
3158 3158
                          true) false x);)) x.when_cond;
3159 3159
           Format.fprintf fmt " => ";
3160
           ((fun x  ->
3160
           (fun x  ->
3161 3161
               ignore
3162 3162
                 (List.fold_left
3163 3163
                    (fun sep  ->
3164 3164
                       fun x  ->
3165
                         if sep then Format.fprintf fmt "";
3165
                         if sep then Format.fprintf fmt "@;";
3166 3166
                         ((__1 ()) fmt) x;
3167
                         true) false x);)) x.when_stmt)
3167
                         Format.fprintf fmt ";";
3168
                         true) ((List.length x) > 1) x);) x.when_stmt;
3169
           Format.fprintf fmt "@]")
3168 3170
    [@ocaml.warning "-A"])
3169 3171

  
3170 3172
and show_vhdl_case_item_t : vhdl_case_item_t -> Ppx_deriving_runtime.string =
......
4728 4730
  ((let open! Ppx_deriving_runtime in
4729 4731
      fun fmt  ->
4730 4732
        fun x  ->
4731
          Format.fprintf fmt "@[<v>process ";
4733
          Format.fprintf fmt "@[<v>@[<v 2>";
4734
          (match x.id with
4735
          | NoName -> Format.fprintf fmt "";
4736
          | _ -> 
4737
              ((__0 ()) fmt) x.id;
4738
              Format.fprintf fmt ": ");
4739
          Format.fprintf fmt "process ";
4732 4740
          (match x.active_sigs with
4733 4741
          | [] -> Format.fprintf fmt "";
4734 4742
          | _ -> Format.fprintf fmt "(";
......
4744 4752
          ((function
4745 4753
             | None  -> Format.pp_print_string fmt ""
4746 4754
             | Some x ->
4755
                 Format.fprintf fmt "@;";
4747 4756
                  ((fun x  ->
4748
                      Format.fprintf fmt "@[<2>";
4749 4757
                      ignore
4750 4758
                        (List.fold_left
4751 4759
                           (fun sep  ->
4752 4760
                              fun x  ->
4753 4761
                                if sep then Format.fprintf fmt "@;";
4754 4762
                                ((__1 ()) fmt) x;
4755
                                true) false x);
4756
                      Format.fprintf fmt "@]")) x;)) x.declarations;
4757
          Format.fprintf fmt "@;@[<v 2>begin@;";
4763
                                true) false x);)) x;)) x.declarations;
4764
          Format.fprintf fmt "@]@;@[<v 2>begin@;";
4758 4765
          ((fun x  ->
4759 4766
               ignore
4760 4767
                 (List.fold_left

Also available in: Unified diff