diff options
author | Camil Staps | 2017-07-30 09:53:24 +0200 |
---|---|---|
committer | Camil Staps | 2017-07-30 09:53:24 +0200 |
commit | ad519a42876796f969900e687cea80c799dd40ec (patch) | |
tree | 608f3250dc4924be286d3c296f74db9bfed5dabd /Sil/Util | |
parent | Reorganise: make Position a field in Syntax types (diff) |
Add positions to Statements
Diffstat (limited to 'Sil/Util')
-rw-r--r-- | Sil/Util/Printer.icl | 4 |
1 files changed, 2 insertions, 2 deletions
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 |