diff --git a/GDWeave.Dumper/CodeGenerator.cs b/GDWeave.Dumper/CodeGenerator.cs index 28a3b6a..cfeb7c3 100644 --- a/GDWeave.Dumper/CodeGenerator.cs +++ b/GDWeave.Dumper/CodeGenerator.cs @@ -2,11 +2,19 @@ public class CodeGenerator(List tokens, List identifiers) { public void Generate(StreamWriter writer) { + var onNewLine = false; foreach (var token in tokens) { var tabs = 0u; var gen = this.GenerateToken(token, ref tabs); - writer.Write(gen + ' '); + onNewLine = gen == "\n"; + + if (!onNewLine) + { + gen += ' '; + } + + writer.Write(gen); for (var i = 0; i < tabs; i++) { writer.Write('\t');