tools/pas2c.hs
changeset 6274 a3e1eb794249
parent 6273 13262c6e5027
child 6275 f1b4f37dba22
--- a/tools/pas2c.hs	Thu Nov 03 23:12:22 2011 +0300
+++ b/tools/pas2c.hs	Thu Nov 03 23:16:26 2011 +0300
@@ -32,7 +32,7 @@
 phrase2C :: Phrase -> Doc
 phrase2C (Phrases p) = braces . nest 4 . vcat . map phrase2C $ p
 phrase2C (ProcCall (Identifier name) params) = text name <> parens (hsep . punctuate (char ',') . map expr2C $ params) <> semi
-phrase2C (IfThenElse (expr) phrase1 mphrase2) = text "if" <> parens (expr2C expr) $$ (braces . nest 4 . phrase2C) phrase1 <+> elsePart
+phrase2C (IfThenElse (expr) phrase1 mphrase2) = text "if" <> parens (expr2C expr) $$ (braces . nest 4 . phrase2C) phrase1 $+$ elsePart
     where
     elsePart | isNothing mphrase2 = empty
              | otherwise = text "else" $$ (braces . nest 4 . phrase2C) (fromJust mphrase2)