From ad519a42876796f969900e687cea80c799dd40ec Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 30 Jul 2017 09:53:24 +0200 Subject: Add positions to Statements --- Sil/Util/Printer.icl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Sil/Util/Printer.icl') diff --git a/Sil/Util/Printer.icl b/Sil/Util/Printer.icl index bcb3c84..283709d 100644 --- a/Sil/Util/Printer.icl +++ b/Sil/Util/Printer.icl @@ -101,14 +101,14 @@ where instance PrettyPrinter Statement where - print st (If bs else) = st <+ printersperse " else " (map oneblock bs) <+ else` + print st (If _ bs else) = st <+ printersperse " else " (map oneblock bs) <+ else` where st` = incIndent st oneblock (c,b) = "if (" <+ c <+ ") {\r\n" <+ print st` b <+ "\r\n" <+ st <+ "}" else` = case else of Nothing -> "" Just e -> " else {\r\n" <+ print st` e <+ "\r\n" <+ st <+ "}" - print st (While c do) = st <+ "while (" <+ c <+ ") {\r\n" <+ + print st (While _ c do) = st <+ "while (" <+ c <+ ") {\r\n" <+ print (incIndent st) do <+ "\r\n" <+ st <+ "}" print st stm = st <+ stm -- cgit v1.2.3