From ea4794ccdc9d0d8709ba22e43494e392b48be768 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 27 Jul 2017 13:05:23 +0200 Subject: Resolve #4: mandatory initial values for basic locals --- Sil/Util/Printer.icl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Sil/Util') diff --git a/Sil/Util/Printer.icl b/Sil/Util/Printer.icl index ff9c3f2..3ed15fb 100644 --- a/Sil/Util/Printer.icl +++ b/Sil/Util/Printer.icl @@ -88,7 +88,11 @@ where instance PrettyPrinter Initialisation where - print st init = st <+ init.init_type <+ " " <+ init.init_name <+ ";" + print st init = st <+ init.init_type <+ " " <+ init.init_name <+ val <+ ";" + where + val = case init.init_value of + Nothing -> "" + Just v -> " := " <+ v instance PrettyPrinter Statement where -- cgit v1.2.3