Skip to content
Snippets Groups Projects
Commit 4f7b85a5 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

In the List printer, do not put the struct field default value in

parenthesis, but after an equal sign, as in lv6.
parent cac61d9d
No related branches found
No related tags found
No related merge requests found
(** Time-stamp: <modified the 04/07/2008 (at 17:25) by Erwan Jahier> *)
(** Time-stamp: <modified the 04/07/2008 (at 18:05) by Erwan Jahier> *)
(* Call it LicDump? *)
......@@ -60,7 +60,7 @@ and string_def_of_type_eff = function
(string_of_type_eff type_eff) ^
match const_eff_opt with
None -> ""
| Some ce -> " (" ^ (string_of_const_eff ce) ^ ")"
| Some ce -> " = " ^ (string_of_const_eff ce)
in
"struct " ^
(List.fold_left (f "; ") (f "" " {" (List.hd fl)) (List.tl fl)) ^ "}"
......
......@@ -3692,7 +3692,7 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/pfs.lus
----------------------------------------------------------------------
====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/struct0.lus
Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/struct0.lus
type _struct0::Toto = struct {x : int (1); y : int (2)};
type _struct0::Toto = struct {x : int = 1; y : int = 2};
node struct0::bibi(dummy:int) returns (z:_struct0::Toto);
let
z = Toto{x=3};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment