diff --git a/src/Generator/Utils/BlockGenerator.cs b/src/Generator/Utils/BlockGenerator.cs index 4759ea38..6087ae40 100644 --- a/src/Generator/Utils/BlockGenerator.cs +++ b/src/Generator/Utils/BlockGenerator.cs @@ -209,6 +209,12 @@ namespace CppSharp Text.NeedNewLine(); } + public bool NeedsNewLine + { + get => Text.NeedsNewLine; + set => Text.NeedsNewLine = value; + } + public void ResetNewLine() { Text.ResetNewLine(); @@ -369,6 +375,12 @@ namespace CppSharp ActiveBlock.NeedNewLine(); } + public bool NeedsNewLine + { + get => ActiveBlock.NeedsNewLine; + set => ActiveBlock.NeedsNewLine = value; + } + public void ResetNewLine() { ActiveBlock.ResetNewLine(); diff --git a/src/Generator/Utils/TextGenerator.cs b/src/Generator/Utils/TextGenerator.cs index b703ee8f..7edbf9f0 100644 --- a/src/Generator/Utils/TextGenerator.cs +++ b/src/Generator/Utils/TextGenerator.cs @@ -5,6 +5,7 @@ namespace CppSharp { public interface ITextGenerator { + bool NeedsNewLine { get; set; } void Write(string msg, params object[] args); void WriteLine(string msg, params object[] args); void WriteLineIndent(string msg, params object[] args);