diff --git a/Src/PCompiler/CompilerCore/Backend/Java/MachineGenerator.cs b/Src/PCompiler/CompilerCore/Backend/Java/MachineGenerator.cs index 5c369e820..8833b2979 100644 --- a/Src/PCompiler/CompilerCore/Backend/Java/MachineGenerator.cs +++ b/Src/PCompiler/CompilerCore/Backend/Java/MachineGenerator.cs @@ -445,7 +445,8 @@ private void WriteStmt(IPStmt stmt) if (ifStmt.ThenBranch.Statements.Count == 0) { - Write("{}"); + WriteLine("{"); + WriteLine("}"); } else { @@ -454,7 +455,7 @@ private void WriteStmt(IPStmt stmt) if (ifStmt.ElseBranch != null && ifStmt.ElseBranch.Statements.Count > 0) { - WriteLine(" else "); + WriteLine("else"); WriteStmt(ifStmt.ElseBranch); } break; @@ -964,4 +965,4 @@ private void WriteStructureAccess(IPExpr e) } } -} \ No newline at end of file +}