Project

General

Profile

« Previous | Next » 

Revision 525eebd1

Added by Guillaume DAVY over 5 years ago

Ada: Correct branch exporting to handle boolean match(using an ada if)

View differences:

src/backends/Ada/ada_backend_common.ml
502 502
  assert (not (String.contains s '\n'));
503 503
  fprintf fmt "-- %s@," s
504 504

  
505
(* Functions which computes the substitution for polymorphic type *)
506 505

  
506
(* Functions which computes the substitution for polymorphic type *)
507 507

  
508 508
(** Check if a submachine is statefull.
509 509
    @param submachine a submachine
......
640 640

  
641 641
(* Procedure pretty print functions *)
642 642

  
643
let pp_block pp_item fmt items =
644
  fprintf fmt "  @[<v>%a%t@]@,"
645
    (Utils.fprintf_list ~sep:";@," pp_item) items
646
    (Utils.pp_final_char_if_non_empty ";" items)
647

  
643 648
(** Print the definition of a procedure
644 649
   @param pp_name the procedure name printer
645 650
   @param pp_prototype the prototype printer
......
650 655
   @param instrs instructions list
651 656
**)
652 657
let pp_procedure_definition pp_name pp_prototype pp_local pp_instr fmt (locals, instrs) =
653
  fprintf fmt "@[<v>%t is%t@[<v>%a%t@]@,begin@,  @[<v>%a%t@]@,end %t@]"
658
  fprintf fmt "@[<v>%t is@,%abegin@,%aend %t@]"
654 659
    pp_prototype
655
    (Utils.pp_final_char_if_non_empty "@,  " locals)
656
    (Utils.fprintf_list ~sep:";@," pp_local) locals
657
    (Utils.pp_final_char_if_non_empty ";" locals)
658
    (Utils.fprintf_list ~sep:";@," pp_instr) instrs
659
    (Utils.pp_final_char_if_non_empty ";" instrs)
660
    (pp_block pp_local) locals
661
    (pp_block pp_instr) instrs
660 662
    pp_name
661 663

  
662 664

  

Also available in: Unified diff