Project

General

Profile

« Previous | Next » 

Revision 32614c2d

Added by Arnaud Dieumegard over 6 years ago

Correction of Procedure declaration pp

View differences:

src/backends/VHDL/vhdl_ast_deriving.ml
2745 2745
            :: fields
2746 2746
           in
2747 2747
        let fields =
2748
          ("parameters",
2749
            ((fun x  ->
2750
                `List (List.map (fun x  -> vhdl_parameter_t_to_yojson x) x))
2751
               x.parameters))
2752
          :: fields  in
2748
          if x.parameters = []
2749
          then fields
2750
          else
2751
            ("parameters",
2752
              (((fun x  ->
2753
                   `List
2754
                     (List.map (fun x  -> vhdl_parameter_t_to_yojson x) x)))
2755
                 x.parameters))
2756
            :: fields
2757
           in
2753 2758
        let fields =
2754 2759
          if x.typeMark = NoName
2755 2760
          then fields
......
2824 2829
                                       })))))
2825 2830
            | _::xs -> loop xs _state  in
2826 2831
          loop xs
2827
            ((Result.Ok ""), (Result.Ok NoName),
2828
              (Result.Error "Vhdl_ast.vhdl_subprogram_spec_t.parameters"),
2832
            ((Result.Ok ""), (Result.Ok NoName), (Result.Ok []),
2829 2833
              (Result.Ok false))
2830 2834
      | _ -> Result.Error "Vhdl_ast.vhdl_subprogram_spec_t")
2831 2835
  [@ocaml.warning "-A"])
......
3088 3092
                     Format.fprintf fmt ":@ ")
3089 3093
            );
3090 3094
            ((__19 ()) fmt) aname;
3091
            ((fun x  ->
3095
            (match aassocs with
3096
            | [] -> Format.fprintf fmt "";
3097
            | _ ->
3098
               ((fun x  ->
3092 3099
                Format.fprintf fmt "(";
3093 3100
                ignore
3094 3101
                  (List.fold_left
......
3097 3104
                          if sep then Format.fprintf fmt ",@ ";
3098 3105
                          ((__20 ()) fmt) x;
3099 3106
                          true) false x);
3100
            Format.fprintf fmt ")")) aassocs;
3107
              Format.fprintf fmt ")")) aassocs);
3101 3108
        | Wait  -> Format.pp_print_string fmt "wait"
3102 3109
        | Null { label = alabel } ->
3103 3110
            (match alabel with
......
3353 3360
            [`String "PROCEDURE_CALL_STATEMENT";
3354 3361
            (let fields = []  in
3355 3362
             let fields =
3356
               ("assocs",
3357
                 ((fun x  ->
3358
                     `List
3359
                       (List.map (fun x  -> vhdl_assoc_element_t_to_yojson x)
3360
                          x)) arg0.assocs))
3361
               :: fields  in
3363
               if arg0.assocs = []
3364
               then fields
3365
               else
3366
                 ("assocs",
3367
                   (((fun x  ->
3368
                        `List
3369
                          (List.map
3370
                             (fun x  -> vhdl_assoc_element_t_to_yojson x) x)))
3371
                      arg0.assocs))
3372
                 :: fields
3373
                in
3362 3374
             let fields =
3363 3375
               ("name", ((fun x  -> vhdl_name_t_to_yojson x) arg0.name)) ::
3364 3376
               fields  in
......
3710 3722
                loop xs
3711 3723
                  ((Result.Ok NoName),
3712 3724
                    (Result.Error "Vhdl_ast.vhdl_sequential_stmt_t.name"),
3713
                    (Result.Error "Vhdl_ast.vhdl_sequential_stmt_t.assocs"))
3725
                    (Result.Ok []))
3714 3726
            | _ -> Result.Error "Vhdl_ast.vhdl_sequential_stmt_t")) arg0
3715 3727
      | `List ((`String "WAIT_STATEMENT")::[]) -> Result.Ok Wait
3716 3728
      | `List ((`String "NULL_STATEMENT")::arg0::[]) ->
......
5233 5245
  ((let open! Ppx_deriving_runtime in
5234 5246
      fun fmt  ->
5235 5247
        fun x  ->
5236
          Format.fprintf fmt "@[<v>@[<v 2>";
5248
          Format.fprintf fmt "@[<v 2>";
5237 5249
          (match x.id with
5238 5250
          | NoName -> Format.fprintf fmt "";
5239 5251
          | _ -> 
......
5252 5264
                              ((__2 ()) fmt) x;
5253 5265
                              true) false x))) x.active_sigs;
5254 5266
                 Format.fprintf fmt ")");
5255
          Format.fprintf fmt "@;";
5267
          Format.fprintf fmt " is@;";
5256 5268
          ((fun x  ->
5257 5269
            ignore
5258 5270
            (List.fold_left
......
5260 5272
                fun x  ->
5261 5273
                  if sep then Format.fprintf fmt "@;";
5262 5274
                    ((__1 ()) fmt) x;
5275
                    Format.fprintf fmt ";";
5263 5276
                    true) false x))) x.declarations;
5264 5277
          Format.fprintf fmt "@]@;@[<v 2>begin@;";
5265 5278
          ((fun x  ->
......
5269 5282
                       fun x  ->
5270 5283
                         if sep then Format.fprintf fmt "@;";
5271 5284
                         ((__3 ()) fmt) x;
5285
                         Format.fprintf fmt ";";
5272 5286
                         true) false x);)) x.body;
5273 5287
          Format.fprintf fmt "@]@;end process;@;";
5274 5288
          Format.fprintf fmt "@]";)

Also available in: Unified diff