From cfb0fba6e707e59d0d228e6379dd9f593df72e78 Mon Sep 17 00:00:00 2001 From: GGG Date: Sun, 28 Jan 2024 22:20:02 -0300 Subject: [PATCH] Fix indentation errors in generated code. --- .../Sample.Internal.g.cs | 3 ++- Tsu.Trees.RedGreen/sourcegen/GreenTreeWriter.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Tsu.Trees.RedGreen/sample/Generated/Tsu.Trees.RedGreen.SourceGenerator/Tsu.Trees.RedGreen.SourceGenerator.Generator/Sample.Internal.g.cs b/Tsu.Trees.RedGreen/sample/Generated/Tsu.Trees.RedGreen.SourceGenerator/Tsu.Trees.RedGreen.SourceGenerator.Generator/Sample.Internal.g.cs index 0937437..0ecb502 100644 --- a/Tsu.Trees.RedGreen/sample/Generated/Tsu.Trees.RedGreen.SourceGenerator/Tsu.Trees.RedGreen.SourceGenerator.Generator/Sample.Internal.g.cs +++ b/Tsu.Trees.RedGreen/sample/Generated/Tsu.Trees.RedGreen.SourceGenerator/Tsu.Trees.RedGreen.SourceGenerator.Generator/Sample.Internal.g.cs @@ -71,7 +71,8 @@ public virtual bool IsEquivalentTo([NotNullWhen(true)] global::Tsu.Trees.RedGree if (this == other) return true; if (other == null) return false; if (this.Kind != other.Kind) return false; -var n = this.SlotCount; + + var n = this.SlotCount; if (n != other.SlotCount) return false; for (int i = 0; i < n; i++) diff --git a/Tsu.Trees.RedGreen/sourcegen/GreenTreeWriter.cs b/Tsu.Trees.RedGreen/sourcegen/GreenTreeWriter.cs index 143b7f8..69cfa39 100644 --- a/Tsu.Trees.RedGreen/sourcegen/GreenTreeWriter.cs +++ b/Tsu.Trees.RedGreen/sourcegen/GreenTreeWriter.cs @@ -180,7 +180,7 @@ public static void WriteGreenRoot(this IndentedTextWriter writer, Tree tree, Nod writer.WriteLine("if (other == null) return false;"); foreach (var extraData in root.ExtraData) { - writer.Write("if (this.{0} != other.{0}) return false;", extraData.PropertyName); + writer.WriteLine("if (this.{0} != other.{0}) return false;", extraData.PropertyName); } writer.WriteLineNoTabs(""); writer.WriteLine("var n = this.SlotCount;");