diff options
author | Camil Staps | 2017-07-27 13:05:23 +0200 |
---|---|---|
committer | Camil Staps | 2017-07-27 13:05:39 +0200 |
commit | ea4794ccdc9d0d8709ba22e43494e392b48be768 (patch) | |
tree | 26cdfda5d554beeecb08983f3d4d38219a779f6c /Sil/Util/Printer.icl | |
parent | Add test file for #10 (lazy logical operators) (diff) |
Resolve #4: mandatory initial values for basic locals
Diffstat (limited to 'Sil/Util/Printer.icl')
-rw-r--r-- | Sil/Util/Printer.icl | 6 |
1 files changed, 5 insertions, 1 deletions
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 |