From a8d1c64f9fd376580a530241958d3c042211fd14 Mon Sep 17 00:00:00 2001 From: Bela VanderVoort Date: Mon, 17 Apr 2023 11:12:56 -0500 Subject: [PATCH] Fixing thing --- Src/CSharpier.Cli/CommandLineFormatter.cs | 2 +- .../Controllers/FormatController.cs | 2 +- .../FormattingTests/BaseTest.cs | 6 +- Src/CSharpier.Tests/Samples/AllInOne.test | 25096 +++++++++++++++- Src/CSharpier.Tests/Samples/Scratch.test | 2 +- Src/CSharpier/XmlFormatter.cs | 13 - 6 files changed, 23965 insertions(+), 1156 deletions(-) delete mode 100644 Src/CSharpier/XmlFormatter.cs diff --git a/Src/CSharpier.Cli/CommandLineFormatter.cs b/Src/CSharpier.Cli/CommandLineFormatter.cs index 05bc6431c..423ac3f56 100644 --- a/Src/CSharpier.Cli/CommandLineFormatter.cs +++ b/Src/CSharpier.Cli/CommandLineFormatter.cs @@ -356,7 +356,7 @@ CancellationToken cancellationToken try { // TODO xml find correct formatter - codeFormattingResult = await CSharpFormatter.FormatAsync( + codeFormattingResult = await CodeFormatter.FormatAsync( fileToFormatInfo.FileContents, Path.GetExtension(fileToFormatInfo.Path), printerOptions, diff --git a/Src/CSharpier.Playground/Controllers/FormatController.cs b/Src/CSharpier.Playground/Controllers/FormatController.cs index 6ceacc8da..64b7c2706 100644 --- a/Src/CSharpier.Playground/Controllers/FormatController.cs +++ b/Src/CSharpier.Playground/Controllers/FormatController.cs @@ -34,7 +34,7 @@ public FormatController(ILogger logger) [HttpPost] public async Task Post([FromBody] string content, string fileExtension) { - // TODO use the proper formatter class? + // TODO xml use the proper formatter class? if (fileExtension == "cs") { var result = await CSharpFormatter.FormatAsync( diff --git a/Src/CSharpier.Tests/FormattingTests/BaseTest.cs b/Src/CSharpier.Tests/FormattingTests/BaseTest.cs index 16e7ccc67..aa59f9ec8 100644 --- a/Src/CSharpier.Tests/FormattingTests/BaseTest.cs +++ b/Src/CSharpier.Tests/FormattingTests/BaseTest.cs @@ -11,7 +11,11 @@ public class BaseTest { private readonly DirectoryInfo rootDirectory = DirectoryFinder.FindParent("CSharpier.Tests"); - protected async Task RunTest(string fileName, string fileExtensionWithoutDot, bool useTabs = false) + protected async Task RunTest( + string fileName, + string fileExtensionWithoutDot, + bool useTabs = false + ) { var filePath = Path.Combine( this.rootDirectory.FullName, diff --git a/Src/CSharpier.Tests/Samples/AllInOne.test b/Src/CSharpier.Tests/Samples/AllInOne.test index 30dffe258..399bbfdcc 100644 --- a/Src/CSharpier.Tests/Samples/AllInOne.test +++ b/Src/CSharpier.Tests/Samples/AllInOne.test @@ -1,623 +1,12130 @@ -#error Error message -#warning Warning message -#pragma warning disable 414, 3021 -#pragma warning restore 3021 -#pragma checksum "file.txt" "{00000000-0000-0000-0000-000000000000}" "2453" -#define foo // Comment in directive -#if foo -#else -#endif -#undef foo - -extern alias Foo; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using M = System.Math; - -#if DEBUG || TRACE -using System.Diagnostics; -#elif SILVERLIGHT && WINDOWS_PHONE || DEBUG || foo == true || foo != false -using System.Diagnostics; -#else -using System.Diagnostics; -#endif - -#region Region - - #region more -using ConsoleApplication2.Test; - #endregion -using X = int1; -using Y = ABC.X; - -using static System.Math; -using static System.DayOfWeek; -using static System.Linq.Enumerable; - -#endregion - -[assembly: System.Copyright(@"(C)"" - -2009")] -[module: System.Copyright("\n\t\u0123(C) \"2009" + "\u0123")] - -class TopLevelType : IDisposable -{ - void IDisposable.Dispose() { } -} - -namespace My -{ - using A.B; - - interface CoContra { } - delegate void CoContra2<[System.Obsolete()] out T, in K>() - where T : struct; - - public unsafe partial class A : C, I - { - [DllImport("kernel32", SetLastError = true)] - static extern bool CreateDirectory(string name, SecurityAttribute sa); - - private const int global = int.MinValue - 1; - - static A() { } - - public A(int foo) - { - L: - { - int i = sizeof(int); - ++i; - var s1 = $"x {1, -2:d}"; - var s2 = $@"x {1, -2:d}"; - } - -#if DEBUG - Console.WriteLine(export.iefSupplied.command); -#endif - const int? local = int.MaxValue; - const Guid? local0 = new Guid(r.ToString()); - - var привет = local; - var мир = local; - var local3 = 0, - local4 = 1; - local3 = local4 = 1; - var local5 = null as Action ?? null; - var local6 = local5 is Action; - - var u = 1u; - var U = 1U; - long hex = 0xBADC0DE, - Hex = 0XDEADBEEF, - l = -1L, - L = 1L, - l2 = 2l; - ulong ul = 1ul, - Ul = 1Ul, - uL = 1uL, - UL = 1UL, - lu = 1lu, - Lu = 1Lu, - lU = 1lU, - LU = 1LU; - int minInt32Value = -2147483648; - int minInt64Value = -9223372036854775808L; - - bool @bool; - byte @byte; - char @char = 'c', - \u0066 = '\u0066', - hexchar = '\x0130', - hexchar2 = (char)0xBAD; - string \U00000065 = "\U00000065"; - decimal @decimal = 1.44M; - @decimal = 1.2m; - dynamic @dynamic; - double @double = M.PI; - @double = 1d; - @double = 1D; - @double = -1.2e3; - float @float = 1.2f; - @float = 1.44F; - int @int = local ?? -1; - long @long; - object @object; - sbyte @sbyte; - short @short; - string @string = @"""/*"; - uint @uint; - ulong @ulong; - ushort @ushort; - - dynamic dynamic = local5; - var add = 0; - var alias = 0; - var arglist = 0; - var ascending = 0; - var async = 0; - var await = 0; - var by = 0; - var descending = 0; - var dynamic = 0; - var equals = 0; - var from = 0; - var get = 0; - var group = 0; - var into = 0; - var join = 0; - var let = 0; - var nameof = 0; - var on = 0; - var orderby = 0; - var partial = 0; - var remove = 0; - var select = 0; - var set = 0; - var when = 0; - var where = 0; - var yield = 0; - var __ = 0; - where = yield = 0; - - if (i > 0) - { - return; - } - else if (i == 0) - { - throw new Exception(); - } - var o1 = new MyObject(); - var o2 = new MyObject(var); - var o3 = new MyObject { A = i }; - var o4 = new MyObject(@dynamic) { A = 0, B = 0, C = 0 }; - var o5 = new { A = 0 }; - var dictionaryInitializer = new Dictionary - { - { 1, "" }, - { 2, "a" } - }; - float[] a = new float[] { 0f, 1.1f }; - int[,,] cube = { - { { 111, 112 }, { 121, 122 } }, - { { 211, 212 }, { 221, 222 } } - }; - - int[][] jagged = { { 111 }, { 121, 122 } }; - int[][,] arr = new int[5][,]; // as opposed to new int[][5,5] - arr[0] = new int[5,5]; // as opposed to arr[0,0] = new int[5]; - arr[0][0, 0] = 47; - int[] arrayTypeInference = new[] { 0, 1 }; - switch (3) { } - switch (i) - { - case 0: - case 1: - { - goto case 2; - } - case 2 + 3: - { - goto default; - break; - } - default: - { - return; - } - } - while (i < 10) - { - ++i; - if (true) - { - continue; - } - break; - } - do - { - ++i; - if (true) - { - continue; - } - break; - } - while (i < 10); - for (int j = 0; j < 100; ++j) - { - for (;;) - { - for (int i = 0, j = 0; i < length; i++, j++) { } - if (true) - { - continue; - } - break; - } - } - label: - goto label; - label2: - ; - foreach (var i in Items()) - { - if (i == 7) - { - return; - } - else - { - continue; - } - } - checked - { - checked(++i); - } - unchecked - { - unchecked(++i); - } - lock (sync) - process(); - using (var v = BeginScope()) - using (A a = new A()) - using (A a = new A(), b = new A()) - using (BeginScope()) - return; - yield return this.items[3]; - yield break; - fixed (int* p = stackalloc int[100], q = &y) - { - *intref = 1; - } - fixed (int* p = stackalloc int[100]) - { - *intref = 1; - } - unsafe - { - int* p = null; - } - try - { - throw null; - } - catch (System.AccessViolationException av) - { - throw av; - } - catch (Exception) - { - throw; - } - finally - { - try { } - catch { } - } - var anonymous = { A = 1, B = 2, C = 3 }; - var query = - from c in customers - let d = c - where d != null - join c1 in customers on c1.GetHashCode() equals c.GetHashCode() - join c1 in customers - on c1.GetHashCode() equals c.GetHashCode() - into e - group c by c.Country into g - orderby g.Count() ascending - orderby g.Key descending - select new { Country = g.Key, CustCount = g.Count() }; - query = from c in customers select c into d select d; - } - ~A() { } - private readonly int f1; - [Obsolete] - [NonExisting] - [Foo::NonExisting(var, 5)] - [CLSCompliant(false)] - [ - Obsolete, - System.NonSerialized, - NonSerialized, - CLSCompliant(true || false & true) - ] - private volatile int f2; - [return: Obsolete] - [method: Obsolete] - public void Handler(object value) { } - public int m(T t) - where T : class, new() - { - base.m(t); - return 1; - } - public string P - { - get { return "A"; } - set; - } - public abstract string P { get; } - public abstract int this[int index] - { - protected internal get; - internal protected set; - } - [method: Obsolete] - [field: Obsolete] - [event: Obsolete] - public readonly event Event E; - [event: Test] - public event Action E1 - { - [Obsolete] - add { value = value; } - [Obsolete] - [return: Obsolete] - remove - { - E += Handler; - E -= Handler; - } - } - public static A operator +(A first, A second) - { - Delegate handler = new Delegate(Handler); - return first.Add(second); - } - [method: Obsolete] - [return: Obsolete] - public static bool operator true(A a) - { - return true; - } - public static bool operator false(A a) - { - return false; - } - class C { } +Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#error Error message"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#warning Warning message"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#pragma warning disable 414, 3021"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#pragma warning restore 3021"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#pragma checksum \"file.txt\" \"{00000000-0000-0000-0000-000000000000}\" \"2453\""), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#define foo // Comment in directive"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#if foo"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#else"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#endif"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#undef foo"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "extern", + " " + ), + Doc.Concat( + "alias", + " " + ), + "Foo", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + "System", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + "System", + ".", + "Collections" + ), + ".", + "Generic" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "System", + ".", + "Linq" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + "System", + ".", + "Linq" + ), + ".", + "Expressions" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "System", + ".", + "Text" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Concat( + "M", + " ", + Doc.Concat( + "=", + " " + ) + ), + Doc.Concat( + "System", + ".", + "Math" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#if DEBUG || TRACE"), + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "System", + ".", + "Diagnostics" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#elif SILVERLIGHT && WINDOWS_PHONE || DEBUG || foo == true || foo != false"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.Trim, + "using System.Diagnostics; +", + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#else"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.Trim, + "using System.Diagnostics; +", + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#endif"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLine, + Doc.Trim, + Doc.BeginRegion("#region Region"), + Doc.HardLine, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLine, + Doc.Trim, + Doc.BeginRegion("#region more"), + Doc.HardLine + ) + ), + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "ConsoleApplication2", + ".", + "Test" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLine, + Doc.Trim, + Doc.EndRegion("#endregion"), + Doc.HardLine + ) + ), + "using", + " " + ), + Doc.Null, + Doc.Concat( + "X", + " ", + Doc.Concat( + "=", + " " + ) + ), + "int1", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Concat( + "Y", + " ", + Doc.Concat( + "=", + " " + ) + ), + Doc.Concat( + "ABC", + ".", + Doc.Group( + "X", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Concat( + "static", + " " + ), + Doc.Null, + Doc.Concat( + "System", + ".", + "Math" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Concat( + "static", + " " + ), + Doc.Null, + Doc.Concat( + "System", + ".", + "DayOfWeek" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Concat( + "static", + " " + ), + Doc.Null, + Doc.Concat( + Doc.Concat( + "System", + ".", + "Linq" + ), + ".", + "Enumerable" + ), + ";" + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLine, + Doc.Trim, + Doc.EndRegion("#endregion"), + Doc.HardLine, + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "[" + ), + "assembly", + Doc.Concat( + ":", + " " + ), + Doc.Group( + Doc.Concat( + "System", + ".", + "Copyright" + ), + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "@\"(C)\"\"", + Doc.LiteralLine, + "", + Doc.LiteralLine, + "2009\"" + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + "[", + "module", + Doc.Concat( + ":", + " " + ), + Doc.Group( + Doc.Concat( + "System", + ".", + "Copyright" + ), + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "\"\n\t\u0123(C) \\"2009\"", + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + "\"\u0123\"" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ) + ), + Doc.HardLine + ), + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "TopLevelType", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + "IDisposable", + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "IDisposable", + ".", + "Dispose", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "My", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "A", + ".", + "B" + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "interface", + " " + ), + "CoContra", + Doc.Group( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "out", + " " + ), + "T" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "in", + " " + ), + "K" + ) + ) + ), + Doc.SoftLine, + ">" + ), + Doc.Null, + " ", + "{", + " ", + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "delegate", + " " + ), + "void", + " ", + "CoContra2", + Doc.Group( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.GroupWithId( + "a82b1bcf-4804-4955-8edb-e8d64c7969f4", + Doc.Group( + "[", + Doc.Group( + Doc.Concat( + "System", + ".", + "Obsolete" + ), + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Null + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.IndentIfBreak( + Doc.Line, + "a82b1bcf-4804-4955-8edb-e8d64c7969f4" + ), + Doc.Concat( + "out", + " " + ), + "T" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "in", + " " + ), + "K" + ) + ) + ), + Doc.SoftLine, + ">" + ), + Doc.Group( + "(", + Doc.Null, + ")" + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + "struct", + Doc.Null + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + "public", + " ", + "unsafe", + " ", + "partial" + ), + " " + ), + Doc.Concat( + "class", + " " + ), + "A", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + "C", + Doc.Indent( + ",", + Doc.Line, + "I" + ) + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.Group( + "[", + Doc.Group( + "DllImport", + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + "\"kernel32\"" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "SetLastError", + " ", + Doc.Concat( + "=", + " " + ) + ), + Doc.Null, + "true" + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Concat( + Doc.Concat( + "extern", + " " + ) + ) + ), + "bool", + " ", + "CreateDirectory", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "string", + " ", + "name" + ), + ",", + Doc.Line, + Doc.Concat( + "SecurityAttribute", + " ", + "sa" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + "private", + " ", + "const" + ), + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "global", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "int", + Doc.Concat( + ".", + "MinValue" + ) + ), + Doc.Group( + Doc.Line, + "-", + " ", + "1" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Null + ), + "A", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "A", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + " ", + "foo" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + "L", + ":", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "i", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "1f72111f-4c49-4ccb-860b-9cba49cadc05", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "sizeof", + "(", + "int", + ")" + ), + "1f72111f-4c49-4ccb-860b-9cba49cadc05" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "++", + "i" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "s1", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + "x ", + Doc.Concat( + "{", + "1", + Doc.Concat( + ",", + " " + ), + Doc.Concat( + "-", + "2" + ), + ":", + "d", + "}" + ), + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "s2", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$@\"", + "x ", + Doc.Concat( + "{", + "1", + Doc.Concat( + ",", + " " + ), + Doc.Concat( + "-", + "2" + ), + ":", + "d", + "}" + ), + "\"" + ) + ) + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#if DEBUG"), + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "Console" + ), + Doc.Concat( + ".", + "WriteLine" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "export", + Doc.Concat( + ".", + "iefSupplied" + ), + Doc.Concat( + ".", + "command" + ) + ), + Doc.Concat( + Doc.Concat( + "export" + ), + Doc.Null, + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + ".", + "iefSupplied" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "command" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#endif"), + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "const" + ), + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + " ", + "local", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "6daecd8f-0a6c-4b9e-8cb7-9819976d094c", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "int", + Doc.Concat( + ".", + "MaxValue" + ) + ), + "6daecd8f-0a6c-4b9e-8cb7-9819976d094c" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "const", + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "Guid", + "?" + ), + " ", + "local0", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "f8c173a1-ac0c-4c83-b3fc-6349f3012326", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Guid", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "r", + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "r" + ), + Doc.Concat( + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ), + "f8c173a1-ac0c-4c83-b3fc-6349f3012326" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "привет", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "f8841f95-00ff-44a4-8aee-465170ad58c8", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "local", + "f8841f95-00ff-44a4-8aee-465170ad58c8" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "мир", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b4b12fde-1d02-437c-bbcb-37be4b5c9f38", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "local", + "b4b12fde-1d02-437c-bbcb-37be4b5c9f38" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + "var", + " ", + Doc.Indent( + Doc.Concat( + "local3", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "0" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "local4", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "local3", + " " + ), + "=", + Doc.GroupWithId( + "8cdf3989-8b8b-48e4-a626-d100069717e6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Group( + "local4", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1" + ) + ) + ), + "8cdf3989-8b8b-48e4-a626-d100069717e6" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "local5", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "null", + Doc.Indent( + Doc.Group( + Doc.Line, + "as", + " ", + "Action" + ) + ) + ), + Doc.Line, + "??", + " ", + "null" + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "local6", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "local5", + Doc.Group( + Doc.Line, + "is", + " ", + "Action" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "u", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1u" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "U", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1U" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + "long", + " ", + Doc.Indent( + Doc.Concat( + "hex", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "0xBADC0DE" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "Hex", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "0XDEADBEEF" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "l", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Concat( + "-", + "1L" + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "L", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1L" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "l2", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "2l" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + "ulong", + " ", + Doc.Indent( + Doc.Concat( + "ul", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1ul" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "Ul", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1Ul" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "uL", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1uL" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "UL", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1UL" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "lu", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1lu" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "Lu", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1Lu" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "lU", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1lU" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "LU", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "1LU" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "minInt32Value", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b94f1744-a8d3-447a-a647-6b9a79ec30ed", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "-", + "2147483648" + ), + "b94f1744-a8d3-447a-a647-6b9a79ec30ed" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "minInt64Value", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "eae948c3-6a42-4b0a-bf40-e2fc070a8d2c", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "-", + "9223372036854775808L" + ), + "eae948c3-6a42-4b0a-bf40-e2fc070a8d2c" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "bool", + " ", + "@bool", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "byte", + " ", + "@byte", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + "char", + " ", + Doc.Indent( + Doc.Concat( + "@char", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "'c'" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "\u0066", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "'\u0066'" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "hexchar", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "'\x0130'" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "hexchar2", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Group( + "(", + "char", + ")", + Doc.Indent( + Doc.SoftLine, + "0xBAD" + ) + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "string", + " ", + "\U00000065", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"\U00000065\"" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "decimal", + " ", + "@decimal", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1.44M" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "@decimal", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1.2m" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "dynamic", + " ", + "@dynamic", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "double", + " ", + "@double", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "2d2691d8-d861-47d5-909d-32c8b2f5b829", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "M", + Doc.Concat( + ".", + "PI" + ) + ), + "2d2691d8-d861-47d5-909d-32c8b2f5b829" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "@double", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1d" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "@double", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1D" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "@double", + " " + ), + "=", + Doc.GroupWithId( + "ed10bc6c-bf59-446e-8487-827824e32c80", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "-", + "1.2e3" + ), + "ed10bc6c-bf59-446e-8487-827824e32c80" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "float", + " ", + "@float", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1.2f" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "@float", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1.44F" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "@int", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "local", + Doc.Group( + Doc.Line, + "??", + " ", + Doc.Concat( + "-", + "1" + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "long", + " ", + "@long", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "object", + " ", + "@object", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "sbyte", + " ", + "@sbyte", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "short", + " ", + "@short", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "string", + " ", + "@string", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "@\"\"\"/*\"" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "uint", + " ", + "@uint", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "ulong", + " ", + "@ulong", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "ushort", + " ", + "@ushort", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "dynamic", + " ", + "dynamic", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "c6b544f7-771e-4e9f-9346-4a3c80a32d8c", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "local5", + "c6b544f7-771e-4e9f-9346-4a3c80a32d8c" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "add", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "alias", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "arglist", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "ascending", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "async", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "await", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "by", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "descending", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "dynamic", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "equals", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "from", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "get", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "group", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "into", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "join", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "let", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "nameof", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "on", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "orderby", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "partial", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "remove", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "select", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "set", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "when", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "where", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "yield", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "__", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "where", + " " + ), + "=", + Doc.GroupWithId( + "a306de40-5591-4f52-90d0-311b640b8990", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Group( + "yield", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + "a306de40-5591-4f52-90d0-311b640b8990" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + ">", + " ", + "0" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + Doc.Null + ), + Doc.Null, + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.HardLine, + Doc.Concat( + "else", + Doc.Concat( + " ", + Doc.Concat( + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + "==", + " ", + "0" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "throw", + Doc.Concat( + " ", + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Exception", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "o1", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "2057aeb6-2b32-49f7-af17-09cc34322a14", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "MyObject", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + "2057aeb6-2b32-49f7-af17-09cc34322a14" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "o2", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "1574248f-36c6-4fca-8d59-0ffe07762904", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "MyObject", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "var" + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ), + "1574248f-36c6-4fca-8d59-0ffe07762904" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "o3", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "2a4312af-5bd0-44db-9c82-c4aa642ec5f6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "MyObject", + Doc.Null, + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "A", + " " + ), + "=", + Doc.GroupWithId( + "62299e93-5ae9-4755-a5a7-b8389a85d048", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "62299e93-5ae9-4755-a5a7-b8389a85d048" + ) + ) + ), + Doc.Line, + "}" + ) + ) + ), + "2a4312af-5bd0-44db-9c82-c4aa642ec5f6" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "o4", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b5ed0602-eefd-47b6-89da-f118eb7b2843", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "MyObject", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "@dynamic" + ), + Doc.SoftLine, + ")" + ), + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Group( + "A", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Group( + "B", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Group( + "C", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ) + ) + ), + Doc.HardLine, + "}" + ) + ) + ), + "b5ed0602-eefd-47b6-89da-f118eb7b2843" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "o5", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "79034426-9f91-4b1b-b041-113d50150ed7", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + Doc.Line + ), + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "A", + " " + ), + Doc.Concat( + "=", + " " + ), + "0" + ) + ), + Doc.Line, + "}" + ), + "79034426-9f91-4b1b-b041-113d50150ed7" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "dictionaryInitializer", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b459eae6-fad3-4766-b792-ea37f201f9f5", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Group( + "Dictionary", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + ",", + Doc.Line, + "string" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Null, + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "\"\"" + ) + ), + Doc.Line, + "}" + ), + ",", + Doc.Line, + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "2", + ",", + Doc.Line, + "\"a\"" + ) + ), + Doc.Line, + "}" + ) + ) + ), + Doc.Line, + "}" + ) + ) + ), + "b459eae6-fad3-4766-b792-ea37f201f9f5" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "float", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "518004a9-03c4-43ca-90ad-739bcbe640ae", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + "float", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "0f", + ",", + Doc.Line, + "1.1f" + ) + ), + Doc.Line, + "}" + ) + ) + ), + "518004a9-03c4-43ca-90ad-739bcbe640ae" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Concat( + Doc.Null, + ",", + Doc.Null, + Doc.Null, + ",", + Doc.Null, + Doc.Null + ), + "]" + ) + ) + ), + " ", + "cube", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "111", + ",", + Doc.Line, + "112" + ) + ), + Doc.Line, + "}" + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "121", + ",", + Doc.Line, + "122" + ) + ), + Doc.Line, + "}" + ) + ) + ), + Doc.HardLine, + "}" + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "211", + ",", + Doc.Line, + "212" + ) + ), + Doc.Line, + "}" + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "221", + ",", + Doc.Line, + "222" + ) + ), + Doc.Line, + "}" + ) + ) + ), + Doc.HardLine, + "}" + ) + ) + ), + Doc.HardLine, + "}" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ), + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "jagged", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + "111" + ), + Doc.Line, + "}" + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "121", + ",", + Doc.Line, + "122" + ) + ), + Doc.Line, + "}" + ) + ) + ), + Doc.HardLine, + "}" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ), + Doc.Concat( + "[", + Doc.Concat( + Doc.Null, + ",", + Doc.Null, + Doc.Null + ), + "]" + ) + ) + ), + " ", + "arr", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "df6fd42f-9267-4137-a1e4-dd1578615c3c", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine + ), + "]" + ), + Doc.Concat( + "[", + Doc.Concat( + Doc.Null, + ",", + Doc.Null, + Doc.Null + ), + "]" + ) + ) + ), + Doc.Null + ), + "df6fd42f-9267-4137-a1e4-dd1578615c3c" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// as opposed to new int[][5,5]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "arr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ), + " " + ), + "=", + Doc.GroupWithId( + "9be782c6-e907-43e0-897f-3ffca8266c59", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "5", + ",", + Doc.Line, + "5" + ) + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + Doc.Null + ), + "9be782c6-e907-43e0-897f-3ffca8266c59" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// as opposed to arr[0,0] = new int[5];", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "arr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ), + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "0", + ",", + Doc.Line, + "0" + ) + ), + Doc.SoftLine, + "]" + ) + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "47" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "arrayTypeInference", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "65f8a7ee-a93d-4702-a813-ca7637f94caa", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "new", + "[", + Doc.Concat( + ), + "]", + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "0", + ",", + Doc.Line, + "1" + ) + ), + Doc.Line, + "}" + ) + ), + "65f8a7ee-a93d-4702-a813-ca7637f94caa" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "switch", + " ", + "(", + Doc.GroupWithId( + "faf43f8f-e343-46b0-8351-f786b14d7de6", + Doc.Indent( + Doc.SoftLine, + "3" + ), + Doc.SoftLine + ), + ")", + " ", + "{", + " ", + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "switch", + " ", + "(", + Doc.GroupWithId( + "590286c8-c4b4-4b50-bad7-5c8c878d85e8", + Doc.Indent( + Doc.SoftLine, + "i" + ), + Doc.SoftLine + ), + ")", + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + "case", + " " + ), + Doc.Group( + "0" + ), + ":" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "case", + " " + ), + Doc.Group( + "1" + ), + ":" + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "goto", + " ", + "case", + Doc.Concat( + " ", + "2" + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + "case", + " " + ), + Doc.Group( + Doc.Group( + "2", + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + "3" + ) + ) + ) + ), + ":" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + "goto", + " ", + "default", + "", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + "break", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + "default", + ":" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + Doc.Null + ), + Doc.Null, + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "while", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + "<", + " ", + "10" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Concat( + "++", + "i" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + "true" + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "continue", + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + "break", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "do", + Doc.Null + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Concat( + "++", + "i" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + "true" + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "continue", + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + "break", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + " ", + Doc.Concat( + "while", + " " + ), + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + "<", + " ", + "10" + ) + ) + ), + Doc.SoftLine + ), + ")", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "for", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "j", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + Doc.Null, + ";" + ), + Doc.Concat( + Doc.Line, + Doc.Group( + "j", + Doc.Indent( + Doc.Group( + Doc.Line, + "<", + " ", + "100" + ) + ) + ) + ), + ";", + Doc.Line, + Doc.Group( + Doc.Indent( + "++", + "j" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "for", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + Doc.Null, + ";" + ), + Doc.Line, + ";", + Doc.Line, + Doc.Group( + Doc.Indent( + Doc.Null + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "for", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Concat( + "int", + " ", + Doc.Indent( + Doc.Concat( + "i", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "0" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + "j", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "0" + ) + ) + ) + ) + ), + Doc.Null, + ";" + ), + Doc.Concat( + Doc.Line, + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "<", + " ", + "length" + ) + ) + ) + ), + ";", + Doc.Line, + Doc.Group( + Doc.Indent( + Doc.Concat( + "i", + "++" + ), + ",", + Doc.Line, + Doc.Concat( + "j", + "++" + ) + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + "true" + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "continue", + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + "break", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "label", + ":", + Doc.HardLine, + Doc.Concat( + Doc.Null, + "goto", + Doc.Null, + Doc.Null, + Doc.Concat( + " ", + "label" + ), + ";" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "label2", + ":", + Doc.HardLine, + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "foreach", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "var", + " ", + "i" + ), + " ", + "in", + " ", + Doc.ConditionalGroup( + Doc.Concat( + "Items", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Items", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + "==", + " ", + "7" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + Doc.Null + ), + Doc.Null, + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.HardLine, + Doc.Concat( + "else", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "continue", + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + "checked", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "checked", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "++", + "i" + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + "unchecked", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "unchecked", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "++", + "i" + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "lock", + " " + ), + "(", + "sync", + ")", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "process", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "process", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "using", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "v", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "84e40709-c37d-4f69-99ae-1344c8974428", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.ConditionalGroup( + Doc.Concat( + "BeginScope", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "BeginScope", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + "84e40709-c37d-4f69-99ae-1344c8974428" + ) + ), + Doc.Null + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "using", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Concat( + "A", + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "1d29f401-d619-4e5e-b4c8-63de1a7becfa", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "A", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + "1d29f401-d619-4e5e-b4c8-63de1a7becfa" + ) + ), + Doc.Null + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "using", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "A", + " ", + Doc.Indent( + Doc.Concat( + "a", + Doc.Group( + " ", + Doc.Concat( + "=", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "A", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "b", + Doc.Group( + " ", + Doc.Concat( + "=", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "A", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ) + ) + ), + Doc.Null + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "using", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "BeginScope", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "BeginScope", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + Doc.Null + ), + Doc.Null, + ";" + ) + ) + ) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "yield", + " " + ), + "return", + Doc.Concat( + " ", + Doc.Concat( + Doc.Group( + "this", + Doc.Concat( + ".", + "items" + ) + ), + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "3" + ), + Doc.SoftLine, + "]" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "yield", + " " + ), + "break", + "", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "fixed", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + "*" + ), + " ", + Doc.Indent( + Doc.Concat( + "p", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "100" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + "" + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + "q", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Concat( + "&", + "y" + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "*", + "intref" + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "fixed", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "*" + ), + " ", + "p", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "100" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + "" + ) + ) + ) + ) + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "*", + "intref" + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + "unsafe", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "*" + ), + " ", + "p", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "try", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "throw", + Doc.Concat( + " ", + "null" + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "catch", + Doc.Group( + Doc.Concat( + " ", + "(", + Doc.Concat( + "System", + ".", + "AccessViolationException" + ), + " ", + "av", + ")" + ), + Doc.Null + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "throw", + Doc.Concat( + " ", + "av" + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + "catch", + Doc.Group( + Doc.Concat( + " ", + "(", + "Exception", + Doc.Null, + Doc.Null, + ")" + ), + Doc.Null + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "throw", + "", + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine, + Doc.Concat( + "finally", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "try", + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.HardLine, + Doc.Concat( + "catch", + Doc.Group( + Doc.Null, + Doc.Null + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "var", + " ", + "anonymous", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Group( + Doc.Group( + "A", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1" + ) + ) + ), + ",", + Doc.Line, + Doc.Group( + Doc.Group( + "B", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "2" + ) + ) + ), + ",", + Doc.Line, + Doc.Group( + Doc.Group( + "C", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "3" + ) + ) + ) + ) + ), + Doc.Line, + "}" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "query", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "from", + " " + ), + Doc.Null, + Doc.Concat( + "c", + " " + ), + Doc.Concat( + "in", + " " + ), + "customers" + ), + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + "let", + " " + ), + Doc.Concat( + "d", + " " + ), + Doc.Concat( + "=", + " " + ), + "c" + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + "where", + Doc.Indent( + Doc.Line, + Doc.Group( + "d", + Doc.Group( + Doc.Line, + "!=", + " ", + "null" + ) + ) + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + "join", + " " + ), + Doc.Null, + Doc.Concat( + "c1", + " " + ), + Doc.Concat( + "in", + " " + ), + "customers", + Doc.Indent( + Doc.Line, + Doc.Concat( + "on", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "c1", + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "c1" + ), + Doc.Concat( + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + " ", + Doc.Concat( + "equals", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "c", + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "c" + ), + Doc.Concat( + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + Doc.Null + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + "join", + " " + ), + Doc.Null, + Doc.Concat( + "c1", + " " + ), + Doc.Concat( + "in", + " " + ), + "customers", + Doc.Indent( + Doc.Line, + Doc.Concat( + "on", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "c1", + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "c1" + ), + Doc.Concat( + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + " ", + Doc.Concat( + "equals", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "c", + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "c" + ), + Doc.Concat( + Doc.Concat( + ".", + "GetHashCode" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + Doc.Concat( + Doc.Line, + Doc.Concat( + "into", + " " + ), + "e" + ) + ) + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Concat( + "group", + " " + ), + "c", + " ", + Doc.Concat( + "by", + " " + ), + Doc.Group( + "c", + Doc.Concat( + ".", + "Country" + ) + ) + ), + " ", + Doc.Concat( + Doc.Concat( + "into", + " " + ), + Doc.Concat( + "g", + Doc.Line + ), + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Null, + "orderby", + Doc.Concat( + " ", + Doc.ConditionalGroup( + Doc.Concat( + "g", + Doc.Concat( + ".", + "Count" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "g" + ), + Doc.Concat( + Doc.Concat( + ".", + "Count" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + " ", + "ascending" + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + "orderby", + Doc.Concat( + " ", + Doc.Group( + "g", + Doc.Concat( + ".", + "Key" + ) + ), + " ", + "descending" + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Concat( + "select", + " " + ), + Doc.Group( + Doc.Concat( + "new", + Doc.Line + ), + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "Country", + " " + ), + Doc.Concat( + "=", + " " + ), + Doc.Group( + "g", + Doc.Concat( + ".", + "Key" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "CustCount", + " " + ), + Doc.Concat( + "=", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "g", + Doc.Concat( + ".", + "Count" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "g" + ), + Doc.Concat( + Doc.Concat( + ".", + "Count" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ) + ) + ) + ), + Doc.Line, + "}" + ) + ) + ) + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "query", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "from", + " " + ), + Doc.Null, + Doc.Concat( + "c", + " " + ), + Doc.Concat( + "in", + " " + ), + "customers" + ), + Doc.Line, + Doc.Concat( + Doc.Concat( + ), + Doc.Concat( + Doc.Null, + Doc.Concat( + "select", + " " + ), + "c" + ), + " ", + Doc.Concat( + Doc.Concat( + "into", + " " + ), + Doc.Concat( + "d", + Doc.Line + ), + Doc.Concat( + Doc.Concat( + ), + Doc.Concat( + Doc.Null, + Doc.Concat( + "select", + " " + ), + "d" + ) + ) + ) + ) + ) + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Group( + Doc.Concat( + "~", + "A" + ), + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + "private", + " ", + "readonly" + ), + " " + ), + Doc.Group( + "int", + " ", + "f1", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "NonExisting", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + Doc.Group( + Doc.Concat( + "Foo", + "::", + "NonExisting" + ), + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + "var" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + "5" + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + Doc.Group( + "CLSCompliant", + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "false" + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "Obsolete", + ",", + Doc.Line, + Doc.Concat( + "System", + ".", + "NonSerialized" + ), + ",", + Doc.Line, + "NonSerialized", + ",", + Doc.Line, + Doc.Group( + "CLSCompliant", + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "true", + Doc.Indent( + Doc.Line, + "||", + " ", + Doc.Group( + "false", + Doc.Indent( + Doc.Group( + Doc.Line, + "&", + " ", + "true" + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + Doc.HardLine + ), + Doc.Group( + Doc.Concat( + "private", + " ", + "volatile" + ), + " " + ), + Doc.Group( + "int", + " ", + "f2", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "return", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "method", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ) + ), + Doc.HardLine + ), + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "Handler", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "object", + " ", + "value" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "int", + " ", + "m", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "T", + " ", + "t" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + Doc.Concat( + "class", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + "new", + "(", + ")" + ) + ) + ) + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "base", + Doc.Concat( + ".", + "m" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "t" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "base" + ), + Doc.Concat( + Doc.Concat( + ".", + "m" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "t" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "1", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "P", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + "get", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "\"A\"", + ";" + ) + ), + Doc.Line + ), + "}" + ), + Doc.Null + ), + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Null, + "set", + ";" + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + "public", + " ", + "abstract" + ), + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "P", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ) + ), + " ", + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + "public", + " ", + "abstract" + ), + " " + ), + Doc.Null, + "int", + " ", + Doc.Null, + Doc.Concat( + "this", + Doc.Concat( + "[", + Doc.Concat( + "int", + " ", + "index" + ), + "]" + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Group( + Doc.Concat( + "protected", + " ", + "internal" + ), + " " + ), + "get", + ";" + ), + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Group( + Doc.Concat( + "internal", + " ", + "protected" + ), + " " + ), + "set", + ";" + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "method", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "field", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "event", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ) + ), + Doc.HardLine + ), + Doc.Group( + Doc.Concat( + "public", + " ", + "readonly" + ), + " " + ), + Doc.Concat( + "event", + " " + ), + Doc.Group( + "Event", + " ", + "E", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.Group( + "[", + "event", + Doc.Concat( + ":", + " " + ), + "Test", + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Group( + "public", + " " + ), + Doc.Concat( + "event", + " " + ), + "Action", + " ", + Doc.Null, + "E1", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.HardLine, + Doc.Concat( + Doc.Group( + "[", + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Null, + "add", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "value", + " " + ), + "=", + Doc.GroupWithId( + "0650a409-1414-4c7a-bd0f-6eb0c2d27ca8", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "value", + "0650a409-1414-4c7a-bd0f-6eb0c2d27ca8" + ) + ), + ";" + ) + ), + Doc.Line + ), + "}" + ), + Doc.Null + ), + Doc.Concat( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "return", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ) + ), + Doc.HardLine + ), + Doc.Null, + "remove", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "E", + " " + ), + "+=", + Doc.GroupWithId( + "e40622fa-6b9f-41a1-9eaa-8b4904b2e8a6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "Handler", + "e40622fa-6b9f-41a1-9eaa-8b4904b2e8a6" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "E", + " " + ), + "-=", + Doc.GroupWithId( + "dbe500e8-ea0d-4b42-9ffc-ac495c9220d0", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "Handler", + "dbe500e8-ea0d-4b42-9ffc-ac495c9220d0" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "A", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "+", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "A", + " ", + "first" + ), + ",", + Doc.Line, + Doc.Concat( + "A", + " ", + "second" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Delegate", + " ", + "handler", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "a3c036be-2f1d-4310-a319-32468e7deda1", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Delegate", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "Handler" + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ), + "a3c036be-2f1d-4310-a319-32468e7deda1" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Group( + "first", + Doc.Concat( + ".", + "Add" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "second" + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "method", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ), + Doc.HardLine, + Doc.Group( + "[", + "return", + Doc.Concat( + ":", + " " + ), + "Obsolete", + Doc.Null, + "]" + ) + ), + Doc.HardLine + ), + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "bool", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "true", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "A", + " ", + "a" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "true", + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "bool", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "false", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "A", + " ", + "a" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "false", + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "C", + Doc.Null, + " ", + "{", + " ", + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "public", + " " + ), + Doc.Concat( + "struct", + " " + ), + "S", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + "I", + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "S", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "private", + " " + ), + Doc.Group( + "int", + " ", + "f1", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + Doc.Group( + "Obsolete", + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + "\"Use Script instead\"" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Concat( + "error", + Doc.Concat( + ":", + " " + ) + ), + "false" + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Group( + Doc.Concat( + "private", + " ", + "volatile" + ), + " " + ), + Doc.Group( + "int", + " ", + "f2", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "abstract", + " " + ) + ) + ), + "int", + " ", + "m", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "T", + " ", + "t" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + "struct", + Doc.Null + ) + ) + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "1", + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "P", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + "get", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "value", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "\"A\"", + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Null, + "set", + ";" + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + "public", + " ", + "abstract" + ), + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "P", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ) + ), + " ", + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + "public", + " ", + "abstract" + ), + " " + ), + Doc.Null, + "int", + " ", + Doc.Null, + Doc.Concat( + "this", + Doc.Concat( + "[", + Doc.Concat( + "int", + " ", + "index" + ), + "]" + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Null, + "get", + ";" + ), + Doc.Concat( + Doc.Line, + Doc.Null, + Doc.Group( + Doc.Concat( + "internal", + " ", + "protected" + ), + " " + ), + "set", + ";" + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Concat( + "event", + " " + ), + Doc.Group( + "Event", + " ", + "E", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "A", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "+", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "A", + " ", + "first" + ), + ",", + Doc.Line, + Doc.Concat( + "A", + " ", + "second" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Group( + "first", + Doc.Concat( + ".", + "Add" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "second" + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "fixed", + " " + ), + Doc.Group( + "int", + " ", + "field", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "10" + ), + Doc.SoftLine, + "]" + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "C", + Doc.Null, + " ", + "{", + " ", + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "public", + " " + ), + Doc.Concat( + "interface", + " " + ), + "I", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "A", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + " ", + "value" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Null, + "string", + " ", + Doc.Null, + "Value", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ), + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "set", + ";" + ) + ), + " ", + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "unsafe", + " ", + Doc.Null + ), + "void", + " ", + "UpdateSignatureByHashingContent", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.GroupWithId( + "6ab06f66-3ecb-4f78-8c4e-d832cffaf931", + Doc.Group( + "[", + "In", + Doc.Null, + "]" + ), + Doc.IndentIfBreak( + Doc.Line, + "6ab06f66-3ecb-4f78-8c4e-d832cffaf931" + ), + Doc.Concat( + "byte", + "*" + ), + " ", + "buffer" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "size" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + ";" + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "[", + "type", + Doc.Concat( + ":", + " " + ), + "Flags", + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Group( + "public", + " " + ), + Doc.Concat( + "enum", + " " + ), + "E", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "A" + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "B", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "A" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "C", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Group( + "2", + Doc.Group( + Doc.Line, + "+", + " ", + "A" + ) + ) + ) + ) + ), + ",", + Doc.Null, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#if DEBUG"), + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "D" + ) + ), + "," + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#else"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.Trim, + " E, } - public struct S : I - { - public S() { } - private int f1; - [Obsolete("Use Script instead", error: false)] - private volatile int f2; - public abstract int m(T t) - where T : struct - { - return 1; - } - public string P - { - get - { - int value = 0; - return "A"; - } - set; - } - public abstract string P { get; } - - public abstract int this[int index] - { - get; - internal protected set; - } - public event Event E; - public static A operator +(A first, A second) - { - return first.Add(second); - } - fixed int field[10]; - class C { } - } - public interface I - { - void A(int value); - string Value { get; set; } - unsafe void UpdateSignatureByHashingContent([In]byte* buffer, int size); - } - [type: Flags] - public enum E - { - A, - B = A, - C = 2 + A, -#if DEBUG - D, - } -#else - E, - } -#endif - - - public delegate void Delegate(object P); - namespace Test - { - using System; - using System.Collections; - public class Список - { - public static IEnumerable Power(int number, int exponent) - { - Список Список = new Список(); - Список.Main(); - int counter = (0 + 0); - int אתר = 0; - while (++counter++ < --exponent--) - { - result = result * number + +number+++++number; - yield return result; - } - } - static void Main() - { - foreach (int i in Power(2, 8)) - { - Console.Write("{0} ", i); - } - } - async void Wait() - { - await System.Threading.Tasks.Task.Delay(0); - } - void AsyncAnonymous() // C # 5 feature - { - var task = Task.Factory.StartNew( - async () => - { - return await new WebClient().DownloadStringTaskAsync( - "http://example.com" - ); - } - ); - } - } - } -} - -namespace ConsoleApplication1 -{ - namespace RecursiveGenericBaseType - { - class A : B, A> - where T : A - { - protected virtual A M() { } - protected abstract B, A> N() { } - static B, A> O() { } - } - - sealed class B : A> - { - protected override A M() { } - protected sealed override B, A> N() { } - new static A O() { } - } - } - - namespace Boo - { - public class Bar - where T : IComparable - { - public T f; - public class Foo : IEnumerable - { - public void Method(K k, T t, U u) - where K : IList, IList, IList - where V : IList - { - A a; - M(A(5)); - } - } - } - } - - class Test - { - void Bar3() - { - var x = new Boo.Bar.Foo(); - x.Method(" ", 5, new object()); - - var q = from i in new int[] { 1, 2, 3, 4 } where i > 5 select i; - } - - public static implicit operator Test(string s) - { - return new ConsoleApplication1.Test(); - } - public static explicit operator Test(string s = "") - { - return new Test(); - } - - public int foo = 5; - void Bar2() - { - foo = 6; - this.Foo = 5.GetType(); - Test t = "sss"; - } - - public event EventHandler MyEvent = delegate { }; - - void Blah() - { - int i = 5; - int? j = 6; - - Expression> e = () => i; - Expression> e2 = b => () => - { - return; - }; - Func f = async delegate(bool a) - { - return await !a; - }; - Func f2 = (a, b) => 0; - f2 = (int a, int b) => 1; - Action a = Blah; - f2 = () => { }; - f2 = () => - { - ; - }; - } - - delegate Recursive Recursive(Recursive r); - delegate Recursive Recursive(Recursive r); - - public Type Foo - { - [Obsolete("Name", error = false)] - get - { - var result = typeof(IEnumerable); - var t = typeof(int?) == typeof(Nullable); - t = typeof(IEnumerable); - return typeof(IEnumerable<>); - } - set - { - var t = typeof(System.Int32); - t.ToString(); - t = value; - } - } - - public void Constants() - { - int i = 1 + 2 + 3 + 5; - global::System.String s = - "a" + (System.String)"a" + "a" + "a" + "a" + "A"; - } - - public void ConstructedType() - { - List i = null; - int c = i.Count; - } - } -} - -namespace Comments.XmlComments.UndocumentedKeywords -{ - /// +", + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#endif"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "public" + ), + " " + ), + Doc.Concat( + "delegate", + " " + ), + "void", + " ", + "Delegate", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "object", + " ", + "P" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "Test", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + "System", + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Null, + Doc.Concat( + "System", + ".", + "Collections" + ), + ";" + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "public", + " " + ), + Doc.Concat( + "class", + " " + ), + "Список", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "IEnumerable", + " ", + "Power", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + " ", + "number" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "exponent" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Список", + " ", + "Список", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "6cdf788b-c369-4a97-9e0e-29b290668320", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Список", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + "6cdf788b-c369-4a97-9e0e-29b290668320" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "Список", + Doc.Concat( + ".", + "Main" + ), + Doc.Group( + "(", + ")" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "counter", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b30f2848-0a3f-41a0-9cb2-04339874bf88", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "0", + Doc.Group( + Doc.Line, + "+", + " ", + "0" + ) + ) + ), + Doc.SoftLine, + ")" + ), + "b30f2848-0a3f-41a0-9cb2-04339874bf88" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "אתר", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "while", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Concat( + "++", + Doc.Concat( + "counter", + "++" + ) + ), + Doc.Group( + Doc.Line, + "<", + " ", + Doc.Concat( + "--", + Doc.Concat( + "exponent", + "--" + ) + ) + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "result", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "result", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "number" + ) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "+", + Doc.Concat( + Doc.Concat( + "number", + "++" + ), + "++" + ) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "number" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "yield", + " " + ), + "return", + Doc.Concat( + " ", + "result" + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Null + ), + "void", + " ", + "Main", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Null, + Doc.Null, + "foreach", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + " ", + "i" + ), + " ", + "in", + " ", + Doc.ConditionalGroup( + Doc.Concat( + "Power", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "2", + ",", + Doc.Line, + "8" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Power", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "2", + ",", + Doc.Line, + "8" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "Console", + Doc.Concat( + ".", + "Write" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "\"{0} \"", + ",", + Doc.Line, + "i" + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "async", + " ", + Doc.Null + ), + "void", + " ", + "Wait", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.Group( + "System", + Doc.Concat( + ".", + "Threading" + ), + Doc.Concat( + ".", + "Tasks" + ), + Doc.Concat( + ".", + "Task" + ), + Doc.Concat( + ".", + "Delay" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + ")" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "AsyncAnonymous", + "(", + Doc.Concat( + ")", + Doc.TrailingComment("// C # 5 feature", CommentType.SingleLine) + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "task", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "656a4860-c367-4497-bc45-1d3fc1c80fc4", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "Task", + Doc.Concat( + ".", + "Factory" + ), + Doc.Concat( + ".", + "StartNew" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Null, + Doc.Group( + "async", + " " + ), + Doc.Null, + Doc.Group( + "(", + Doc.Null, + ")" + ), + " ", + "=>", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "WebClient", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + Doc.Concat( + ".", + "DownloadStringTaskAsync" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"http://example.com\"" + ), + Doc.SoftLine, + ")" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + ")" + ) + ), + "656a4860-c367-4497-bc45-1d3fc1c80fc4" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "ConsoleApplication1", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "RecursiveGenericBaseType", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "A", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + Doc.Group( + "B", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Null + ) + ) + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ) + ) + ) + ) + ), + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "protected", + " ", + Doc.Concat( + Doc.Concat( + "virtual", + " " + ) + ) + ), + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + " ", + "M", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "protected", + " ", + Doc.Concat( + Doc.Concat( + "abstract", + " " + ) + ) + ), + Doc.Group( + "B", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "N", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Null + ), + Doc.Group( + "B", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "O", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "sealed", + " " + ), + Doc.Concat( + "class", + " " + ), + "B", + Doc.Group( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T1" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T2" + ) + ) + ), + Doc.SoftLine, + ">" + ), + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "B", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "T1", + ",", + Doc.Line, + "T2" + ) + ), + Doc.SoftLine, + ">" + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "protected", + " ", + Doc.Concat( + Doc.Concat( + "override", + " " + ) + ) + ), + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + " ", + "M", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "protected", + " ", + Doc.Concat( + Doc.Concat( + "sealed", + " " + ), + Doc.Concat( + "override", + " " + ) + ) + ), + Doc.Group( + "B", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "N", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "new", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + " ", + "O", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "Boo", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Group( + "public", + " " + ), + Doc.Concat( + "class", + " " + ), + "Bar", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + "IComparable" + ) + ) + ) + ), + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Group( + "T", + " ", + "f", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "public", + " " + ), + Doc.Concat( + "class", + " " + ), + "Foo", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "U" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + Doc.Group( + "IEnumerable", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "Method", + Doc.Group( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "K" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "V" + ) + ) + ), + Doc.SoftLine, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "K", + " ", + "k" + ), + ",", + Doc.Line, + Doc.Concat( + "T", + " ", + "t" + ), + ",", + Doc.Line, + Doc.Concat( + "U", + " ", + "u" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + "where", + " " + ), + "K", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + Doc.Group( + "IList", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "V" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "IList", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + ",", + Doc.Line, + Doc.Group( + "IList", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "U" + ), + Doc.Null, + ">" + ) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "V", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + Doc.Group( + "IList", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "K" + ), + Doc.Null, + ">" + ) + ) + ) + ) + ) + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "a", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "M", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "B", + ",", + Doc.Line, + "C" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "B", + ",", + Doc.Line, + "C" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "M", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "B", + ",", + Doc.Line, + "C" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "B", + ",", + Doc.Line, + "C" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "Test", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Bar3", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "x", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "125ec54f-27f1-4760-822b-b601d3028f84", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + Doc.Concat( + "Boo", + ".", + Doc.Group( + "Bar", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ) + ), + ".", + Doc.Group( + "Foo", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "object" + ), + Doc.Null, + ">" + ) + ) + ), + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + "125ec54f-27f1-4760-822b-b601d3028f84" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "x", + Doc.Concat( + ".", + Doc.Group( + "Method", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "string", + ",", + Doc.Line, + "string" + ) + ), + Doc.SoftLine, + ">" + ) + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "\" \"", + ",", + Doc.Line, + "5", + ",", + Doc.Line, + Doc.Group( + Doc.Concat( + "new", + " " + ), + "object", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "x" + ), + Doc.Concat( + Doc.Concat( + ".", + Doc.Group( + "Method", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "string", + ",", + Doc.Line, + "string" + ) + ), + Doc.SoftLine, + ">" + ) + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "\" \"", + ",", + Doc.Line, + "5", + ",", + Doc.Line, + Doc.Group( + Doc.Concat( + "new", + " " + ), + "object", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "q", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "from", + " " + ), + Doc.Null, + Doc.Concat( + "i", + " " + ), + Doc.Concat( + "in", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "2", + ",", + Doc.Line, + "3", + ",", + Doc.Line, + "4" + ) + ), + Doc.Line, + "}" + ) + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "where", + Doc.Indent( + Doc.Line, + Doc.Group( + "i", + Doc.Group( + Doc.Line, + ">", + " ", + "5" + ) + ) + ) + ) + ), + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Concat( + "select", + " " + ), + "i" + ) + ) + ) + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + Doc.Concat( + "implicit", + " " + ), + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "Test", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "string", + " ", + "s" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + "ConsoleApplication1", + ".", + "Test" + ), + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + Doc.Concat( + "explicit", + " " + ), + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "Test", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "string", + " ", + "s", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "\"\"" + ) + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Test", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "foo", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "5" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Bar2", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "foo", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "6" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Group( + "this", + Doc.Concat( + ".", + "Foo" + ) + ), + " " + ), + "=", + Doc.GroupWithId( + "ace7e8be-f46d-4a7d-a555-afae3cb65183", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "5", + Doc.Concat( + ".", + "GetType" + ), + Doc.Group( + "(", + ")" + ) + ), + "ace7e8be-f46d-4a7d-a555-afae3cb65183" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Test", + " ", + "t", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"sss\"" + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Concat( + "event", + " " + ), + Doc.Group( + Doc.Group( + Doc.Concat( + "EventHandler", + " ", + "MyEvent", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "45f96df5-f407-48b0-b200-5c6c4377eac1", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + "delegate", + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ) + ), + "45f96df5-f407-48b0-b200-5c6c4377eac1" + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Blah", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "i", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "5" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + " ", + "j", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "6" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Expression", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "Func", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "e", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "599b2215-4a52-4528-8a6c-1b0e507b0b3a", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Null, + ")" + ), + " ", + "=>", + Doc.Group( + Doc.Indent( + Doc.Line, + "i" + ) + ) + ), + "599b2215-4a52-4528-8a6c-1b0e507b0b3a" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Expression", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "Func", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "bool", + ",", + Doc.Line, + "Action" + ) + ), + Doc.SoftLine, + ">" + ) + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "e2", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "c89e4187-bf4d-480e-a416-d6f8b4bf47f6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Null, + "b", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Null, + ")" + ), + " ", + "=>", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + Doc.Null + ), + Doc.Null, + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + "c89e4187-bf4d-480e-a416-d6f8b4bf47f6" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Func", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "bool", + ",", + Doc.Line, + "bool" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "f", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "77337785-9498-4872-a405-5f0425f07e3b", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Group( + "async", + " " + ), + "delegate", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "bool", + " ", + "a" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.Concat( + "!", + "a" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + "77337785-9498-4872-a405-5f0425f07e3b" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Func", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + ",", + Doc.Line, + "int", + ",", + Doc.Line, + "int" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "f2", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "14361d42-e482-4f33-99bb-070ed2290c20", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "a", + ",", + Doc.Line, + "b" + ) + ), + Doc.SoftLine + ), + ")" + ), + " ", + "=>", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + "14361d42-e482-4f33-99bb-070ed2290c20" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "f2", + " " + ), + "=", + Doc.GroupWithId( + "8d91fa71-ccf9-425a-a599-00c36ca625b8", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + " ", + "a" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "b" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + " ", + "=>", + Doc.Group( + Doc.Indent( + Doc.Line, + "1" + ) + ) + ), + "8d91fa71-ccf9-425a-a599-00c36ca625b8" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Action", + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "c6027a85-5632-423f-99c2-093865370aa6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "Blah", + "c6027a85-5632-423f-99c2-093865370aa6" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "f2", + " " + ), + "=", + Doc.GroupWithId( + "fd2b77ef-f9e6-43ed-b09b-200ec8214a53", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Null, + ")" + ), + " ", + "=>", + " ", + Doc.Group( + Doc.Null, + "{", + " ", + "}" + ) + ), + "fd2b77ef-f9e6-43ed-b09b-200ec8214a53" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "f2", + " " + ), + "=", + Doc.GroupWithId( + "e4511533-1530-4157-a5f7-6d99d45061db", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Null, + ")" + ), + " ", + "=>", + Doc.HardLine, + Doc.Group( + Doc.Null, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + ";" + ), + Doc.HardLine + ), + "}" + ) + ), + "e4511533-1530-4157-a5f7-6d99d45061db" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "delegate", + " " + ), + "Recursive", + " ", + "Recursive", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "Recursive", + " ", + "r" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "delegate", + " " + ), + "Recursive", + " ", + "Recursive", + Doc.Group( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "A" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "R" + ) + ) + ), + Doc.SoftLine, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "Recursive", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "A", + ",", + Doc.Line, + "R" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "r" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "Type", + " ", + Doc.Null, + "Foo", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Concat( + Doc.HardLine, + Doc.Concat( + Doc.Group( + "[", + Doc.Group( + "Obsolete", + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + "\"Name\"" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "error", + " ", + Doc.Concat( + "=", + " " + ) + ), + Doc.Null, + "false" + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null, + "]" + ), + Doc.HardLine + ), + Doc.Null, + "get", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "result", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b04af53f-984e-4856-861f-e6d33f900992", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "typeof", + "(", + Doc.Group( + "IEnumerable", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + ")" + ), + "b04af53f-984e-4856-861f-e6d33f900992" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "t", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Concat( + "typeof", + "(", + Doc.Concat( + "int", + "?" + ), + ")" + ), + Doc.Group( + Doc.Line, + "==", + " ", + Doc.Concat( + "typeof", + "(", + Doc.Group( + "Nullable", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + ")" + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "t", + " " + ), + "=", + Doc.GroupWithId( + "db7f7705-2f97-464a-a5d6-3da74a8b5117", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "typeof", + "(", + Doc.Group( + "IEnumerable", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ), + Doc.Concat( + "[", + Doc.Null, + "]" + ), + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ) + ), + Doc.Null, + ">" + ) + ), + ")" + ), + "db7f7705-2f97-464a-a5d6-3da74a8b5117" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + "typeof", + "(", + Doc.Group( + "IEnumerable", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + Doc.Null + ), + Doc.Null, + ">" + ) + ), + ")" + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + "set", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "t", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "4f1eaaaf-edb1-48e2-a601-e44443abda16", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "typeof", + "(", + Doc.Concat( + "System", + ".", + "Int32" + ), + ")" + ), + "4f1eaaaf-edb1-48e2-a601-e44443abda16" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "t", + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "t" + ), + Doc.Concat( + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "t", + " " + ), + "=", + Doc.GroupWithId( + "26cb65b5-3f8e-45c0-b48f-39dcb4924182", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "value", + "26cb65b5-3f8e-45c0-b48f-39dcb4924182" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.Line, + "}" + ), + Doc.Null, + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "Constants", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "i", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "1", + Doc.Concat( + Doc.Line, + "+", + " ", + "2" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "3" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "5" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "global", + "::", + "System" + ), + ".", + "String" + ), + " ", + "s", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "\"a\"", + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Group( + "(", + Doc.Concat( + "System", + ".", + "String" + ), + ")", + Doc.Indent( + Doc.SoftLine, + "\"a\"" + ) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "\"a\"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "\"a\"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "\"a\"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "\"A\"" + ) + ) + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "ConstructedType", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "List", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "i", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "c", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "12ea48eb-aa9a-498d-a7c8-5c1f3e4ff390", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "i", + Doc.Concat( + ".", + "Count" + ) + ), + "12ea48eb-aa9a-498d-a7c8-5c1f3e4ff390" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + Doc.Concat( + Doc.Concat( + "Comments", + ".", + "XmlComments" + ), + ".", + "UndocumentedKeywords" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("/// /// Whatever /// /// @@ -632,523 +12139,11834 @@ namespace Comments.XmlComments.UndocumentedKeywords /// /// /// - /// - class /*///*/C - { - void M(T t, U u) - { - // comment - /* *** / */ - /* // - */ - /*s*///comment - // /***/ - /*s*/int /*s*/intValue = 0; - intValue = intValue /*s*/+ 1; - string strValue = /*s*/"hello"; - /*s*/MyClass c = new MyClass(); - string verbatimStr = /*s*/@"\\\\"; - } - } - - //General Test F. Type a very long class name, verify colorization happens correctly only upto the correct size (118324) - class TestClassXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/*Scen8*/{ } - - class TestClassXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX22/*Scen9*/{ } - - class yield - { - void Foo(__arglist) - { - C c = null; - c.M(5, default(U)); - TypedReference tr = __makeref(c); - Type t = __reftype(tr); - int j = __refvalue(tr, int); - Params(a: t, b: t); - Params(ref c, out c); - } - void Params(ref dynamic a, out dynamic b, params dynamic[] c) { } - void Params( - out dynamic a = 2, - ref dynamic c = default(dynamic), - params dynamic[][] c) { } - - public override string ToString() - { - return base.ToString(); - } - - public partial void OnError(); - - public partial void method() - { - int?[] a = new int?[5]; /*[] bug*/ // YES [] - int[] var = { 1, 2, 3, 4, 5 }; /*,;*/ - int i = a[i]; /*[]*/ - Foo f = new Foo(); /*<> ()*/ - f.method(); /*().*/ - i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/ - bool b = true & false | true ^ false; /*& | ^*/ - b = !b; /*!*/ - i = ~i; /*~i*/ - b = i < i && i > i; /*< && >*/ - int? ii = 5; /*? bug*/ // NO ? - int f = true ? 1 : 0; /*? :*/ // YES : - i++; /*++*/ - i--; /*--*/ - b = true && false || true; /*&& ||*/ - i << 5; /*<<*/ - i >> 5; /*>>*/ - b = i == i && i != i && i <= i && i >= i; /*= == && != <= >=*/ - i += 5.0; /*+=*/ - i -= i; /*-=*/ - i *= i; /* *=*/ - i /= i; /*/=*/ - i %= i; /*%=*/ - i &= i; /*&=*/ - i |= i; /*|=*/ - i ^= i; /*^=*/ - i <<= i; /*<<=*/ - i >>= i; /*>>=*/ - object s = x => x + 1; /*=>*/ - double d = .3; - Point point; - unsafe - { - Point* p = &point; /* * &*/ - p->x = 10; /*->*/ - } - IO::BinaryReader br = null; - x[i: 1] = 3; - x[i: 1, j: 5] = "str"; - } - - struct Point - { - public int X; - public int Y; - public void ThisAccess() - { - this = this; - } - } - } - - // From here:https://github.com/dotnet/roslyn/wiki/New-Language-Features-in-C%23-6 - class CSharp6Features - { - // Initializers for auto-properties - public string First { get; set; } = "Jane"; - public string Last { get; set; } = "Doe"; - - // Getter-only auto-properties - public string Third { get; } = "Jane"; - public string Fourth { get; } = "Doe"; - - // Expression bodies on method-like members - public Point Move(int dx, int dy) => new Point(x + dx, y + dy); - public static Complex operator +(Complex a, Complex b) => a.Add(b); - public static implicit operator string(Person p) => - p.First + " " + p.Last; - public void Print() => Console.WriteLine(First + " " + Last); - - // Expression bodies on property-like function members - public string Name => First + " " + Last; - public int this[long id] => id; - - async void Test() - { - // Using static - WriteLine(Sqrt(3 * 3 + 4 * 4)); - WriteLine(Friday - Monday); - var range = Range(5, 17); // Ok: not extension - var even = range.Where(i => i % 2 == 0); // Ok - - // Null-conditional operators - int? length = customers?.Length; // null if customers is null - Customer first = customers?[0]; // null if customers is null - int length = customers?.Length ?? 0; // 0 if customers is null - int? first = customers?[0]?.Orders?.Count(); - PropertyChanged?.Invoke(this, args); - - // String interpolation - string s = $"{p.Name, 20} is {p.Age:D3} year{{s}} old #"; - s = $"{p.Name} is \"{p.Age} year{(p.Age == 1 ? "" : "s")} old"; - s = $"{(p.Age == 2 ? $"{new Person { }}" : "")}"; - s = $@"\{p.Name} - ""\"; - s = $"Color [ R={func(b: 3):#0.##}, G={G:#0.##}, B={B:#0.##}, A={A:#0.##} ]"; - - // nameof expressions - if (x == null) - { - throw new ArgumentNullException(nameof(x)); - } - - WriteLine(nameof(person.Address.ZipCode)); // prints "ZipCode" - - // Index initializers - var numbers = new Dictionary - { - [7] = "seven", - [9] = "nine", - [13] = "thirteen" - }; - - // Exception filters - try { } - catch (MyException e) when (myfilter(e)) { } - - // Await in catch and finally blocks - Resource res = null; - try - { - res = await Resource.OpenAsync(); // You could do this. - } - catch (ResourceException e) - { - await Resource.LogAsync(res, e); // Now you can do this … - } - finally - { - if (res != null) - { - await res.CloseAsync(); // … and this. - } - } - } - } -} -#line 6 -#line 2 "test.cs" -#line default -#line hidden - -class CSharp70 -{ - void PatternMatching(string arg, int b) - { - switch (arg) - { - case "A" when b > 50: - case "B" when b < 50: - default: - break; - } - - (A D, E H) = e; - - if (x?.y?.z is Type value2) - { - // code using value - } - - if (expr is Type v) - { - Hello(); - } - } - - public static async Task LocalFunctions(string[] args) - { - string Hello2(int i) - { - return args[i]; - } - - async Task Hello(T i) => await Task.FromResult(args[i]); - await Hello(1); - } - - public static void OutVar(string[] args) - { - int.TryParse(Hello(1), out var item); - int.TryParse(Hello(1), out int item); - } - - public void ThrowExpression() - { - var result = nullableResult ?? throw new NullReferenceException(); - } - - public void BinaryLiterals() - { - int nineteen = 0b10011; - } - - public void DigitSeparators() - { - int bin = 0b1001_1010_0001_0100; - int hex = 0x1b_a0_44_fe; - int dec = 33_554_432; - int weird = 1_2__3___4____5_____6______7_______8________9; - double real = 1_000.111_1e-1_000; - } -} - -class CSharp71 -{ - void DefaultWithoutTypeName(string content = default) - { - DefaultWithoutTypeName(default); - } - - void TupleRecognize(int a, (int, int) b, (int, int, int)? c) - { - var result = list.Select(c => (c.f1, f3: c.f2)).Where(t => t.f2 == 1); - } -} - -class CSharp72 -{ - readonly struct ReadonlyRef1 - { - Func s = (in int x) => x; - ref TValue this[in TKey index] => null; - public static Vector3 operator +(in Vector3 x, in Vector3 y) => null; - - static readonly ref Vector3 M1_Trace() - { - // OK - ref readonly var r1 = ref M1(); - - // Not valid. Need an LValue - ref readonly Vector3 r2 = ref default(Vector3); - - // Not valid. r1 is readonly. - Mutate(ref r1); - - // OK. - Print(in r1); - - // OK. - return ref r1; - } - } - - ref struct ReadonlyRef2 - { - ref readonly Guid Test(in Vector3 v1, in Vector3 v2) - { - // not OK!! - v1 = default(Vector3); - - // not OK!! - v1.X = 0; - - // not OK!! - foo(ref v1.X); - - return ref (arr != null ? ref arr[0] : ref otherArr[0]); - - Span span = stackalloc int[1]; - - // OK - return new Vector3(v1.X + v2.X, v1.Y + v2.Y, v1.Z + v2.Z); - } - - ref T Choice(bool condition, ref T consequence, ref T alternative) - { - if (condition) - { - return ref consequence; - } - else - { - return ref alternative; - } - } - } - - public void DoSomething(bool isEmployed, string personName, int personAge) - { } - - public void NonTrailingNamedArguments() - { - DoSomething(isEmployed: true, name, age); // currently CS1738, but would become legal - DoSomething(true, personName: name, age); // currently CS1738, but would become legal - DoSomething(name, isEmployed: true, age); // remains illegal - DoSomething(name, age, isEmployed: true); // remains illegal - DoSomething(true, personAge: age, personName: name); // already legal - } - - public void ConditionalRef() - { - ref var r = ref (arr != null ? ref arr[0] : ref otherArr[0]); - } - - public void LeadingSeparator() - { - var res = 0 - + 123 // permitted in C# 1.0 and later - + 1_2_3 // permitted in C# 7.0 and later - + 0x1_2_3 // permitted in C# 7.0 and later - + 0b101 // binary literals added in C# 7.0 - + 0b1_0_1 // permitted in C# 7.0 and later - - // in C# 7.2, _ is permitted after the `0x` or `0b` - + 0x_1_2 // permitted in C# 7.2 and later - + 0b_1_0_1 // permitted in C# 7.2 and later - ; - } -} - -class CSharp73 -{ - void Blittable(T value) - where T : unmanaged - { - var unmanaged = 666; - } - - unsafe struct IndexingMovableFixed - { - public fixed int myFixedField[10]; - } - - static IndexingMovableFixed s; - - public unsafe void IndexingMovableFixedFields() - { - int* ptr = s.myFixedField; - int t = s.myFixedField[5]; - } - - public void PatternBasedFixed() - { - fixed (byte* ptr = byteArray) - { - // ptr is a native pointer to the first element of the array - // byteArray is protected from being moved/collected by the GC for the duration of this block - } - } - - public void StackallocArrayInitializer() - { - Span a = stackalloc int[3]; // currently allowed - Span a = stackalloc int[3] { 1, 2, 3 }; - Span a = stackalloc int[] { 1, 2, 3 }; - Span a = stackalloc[] { 1, 2, 3 }; - } - - public void TupleEquality() - { - (int, (int, int)) t1, t2; - var res = t1 == (1, (2, 3)); - } -} - -namespace CSharp80 -{ - class CSharp80ExceptInterfaceDefaultImplement - { - void ReferenceNullable() - { - var? x = E; - x!.ToString(); - string? wtf = null; - int?[]? hello; - } - - void Patterns() - { - if (o is string { Length: 5 } s) - { - Do(); - } - - return lang.CountOfTokens switch - { - 1 => 100, - 2 => 200, - _ => throw new global::System.Exception() - }; - - var newState = (GetState(), action, hasKey) switch - { - (DoorState.Closed, Action.Open, _) => DoorState.Opened, - (DoorState.Opened, Action.Close, _) => DoorState.Closed, - (DoorState.Closed, Action.Lock, true) => DoorState.Locked, - (DoorState.Locked, Action.Unlock, true) => DoorState.Closed, - (var state, _, _) => state - }; - } - - async Task AsyncStreams() - { - await foreach (var item in asyncEnumerables) { } - } - - void Ranges() - { - var thirdItem = list[2]; // list[2] - var lastItem = list[^1]; // list[Index.CreateFromEnd(1)] - var multiDimensional = list[3, ^2]; // list[3, Index.CreateFromEnd(2)] - - var slice1 = list[2..^3]; // list[Range.Create(2, Index.CreateFromEnd(3))] - var slice2 = list[..^3]; // list[Range.ToEnd(Index.CreateFromEnd(3))] - var slice3 = list[2..]; // list[Range.FromStart(2)] - var slice4 = list[..]; // list[Range.All] - var multiDimensional = list[1..2, ..]; // list[Range.Create(1, 2), Range.All] - } - - void UsingDeclarators() - { - using var item = new FileStream("./.f"); - fixed (char* ch = "hell"); - item.Dispose(); - } - - void StaticLocalFunction() - { - static unsafe void Func1() { } - static unsafe void Func1() { } - async static void Func2() { } - static async void Func2() { } - } - - void NullCoalescingAssignment() - { - var item = a ??= b ??= c ??= d ??= throw new Exception(); - } - - public readonly float Hello() - { - return 0.1f; - } - } - - interface IA - { - void M() - { - WriteLine("IA.M"); - } - } - - interface IA - { - void M() - { - WriteLine("IA.M"); - } - } - - interface IB : IA - { - override void IA.M() // explicitly named - { - WriteLine("IB.M"); - } - } - - interface IC : IA - { - override void M() // implicitly named - { - WriteLine("IC.M"); - } - } -} - + /// ", CommentType.SingleLine), + Doc.HardLineSkipBreakIfFirstInGroup + ), + "class", + Doc.Concat( + " ", + Doc.TrailingComment("/*///*/", CommentType.MultiLine) + ), + " " + ), + "C", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "M", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "U" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "T", + " ", + "t" + ), + ",", + Doc.Line, + Doc.Concat( + "U", + " ", + "u" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// comment", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment(" /* *** / */", CommentType.MultiLine), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment(" /* // + */", CommentType.MultiLine), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment(" /*s*/", CommentType.MultiLine), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment("//comment", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment("// /***/", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment(" /*s*/", CommentType.MultiLine) + ), + "int", + Doc.Concat( + " ", + Doc.TrailingComment("/*s*/", CommentType.MultiLine) + ) + ), + " ", + "intValue", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "intValue", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Concat( + "intValue", + Doc.Concat( + " ", + Doc.TrailingComment("/*s*/", CommentType.MultiLine) + ) + ), + Doc.Group( + Doc.Line, + "+", + " ", + "1" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "string", + " ", + "strValue", + Doc.Null + ), + " " + ), + Doc.Concat( + "=", + Doc.Concat( + " ", + Doc.TrailingComment("/*s*/", CommentType.MultiLine) + ) + ), + Doc.Group( + Doc.Indent( + Doc.Line, + "\"hello\"" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment(" /*s*/", CommentType.MultiLine), + "MyClass" + ), + " ", + "c", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "3d5bedd1-37ba-41a5-8f0d-95f27453b65e", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "MyClass", + Doc.Group( + "(", + ")" + ), + Doc.Null + ), + "3d5bedd1-37ba-41a5-8f0d-95f27453b65e" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "string", + " ", + "verbatimStr", + Doc.Null + ), + " " + ), + Doc.Concat( + "=", + Doc.Concat( + " ", + Doc.TrailingComment("/*s*/", CommentType.MultiLine) + ) + ), + Doc.Group( + Doc.Indent( + Doc.Line, + "@\"\\\\\"" + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("//General Test F. Type a very long class name, verify colorization happens correctly only upto the correct size (118324)", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "class", + " " + ), + Doc.Concat( + "TestClassXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + Doc.Concat( + " ", + Doc.TrailingComment("/*Scen8*/", CommentType.MultiLine) + ) + ), + Doc.Null, + " ", + "{", + " ", + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + Doc.Concat( + "TestClassXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX22", + Doc.Concat( + " ", + Doc.TrailingComment("/*Scen9*/", CommentType.MultiLine) + ) + ), + Doc.Null, + " ", + "{", + " ", + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "yield", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Foo", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "U" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "__arglist" + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "C", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "U" + ), + Doc.Null, + ">" + ) + ), + " ", + "c", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "c", + Doc.Concat( + ".", + Doc.Group( + "M", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "5", + ",", + Doc.Line, + Doc.Concat( + "default", + "(", + "U", + ")" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "c" + ), + Doc.Concat( + Doc.Concat( + ".", + Doc.Group( + "M", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ) + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "5", + ",", + Doc.Line, + Doc.Concat( + "default", + "(", + "U", + ")" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "TypedReference", + " ", + "tr", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "3c001921-b9b0-4267-a8ab-d0a5ca503f4f", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "__makeref", + "(", + "c", + ")" + ), + "3c001921-b9b0-4267-a8ab-d0a5ca503f4f" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Type", + " ", + "t", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "f74531d1-069a-42f9-ba21-0750e93d52ce", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "__reftype", + "(", + "tr", + ")" + ), + "f74531d1-069a-42f9-ba21-0750e93d52ce" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "j", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "c4494fef-5b2f-4d8d-8ccd-1cd23190a794", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "__refvalue", + "(", + "tr", + Doc.Concat( + ",", + " " + ), + "int", + ")" + ), + "c4494fef-5b2f-4d8d-8ccd-1cd23190a794" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "Params", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "a", + Doc.Concat( + ":", + " " + ) + ), + "t" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "b", + Doc.Concat( + ":", + " " + ) + ), + "t" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Params", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "a", + Doc.Concat( + ":", + " " + ) + ), + "t" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "b", + Doc.Concat( + ":", + " " + ) + ), + "t" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "Params", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "c" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + "c" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Params", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "c" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + "c" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Params", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "ref", + " " + ), + "dynamic", + " ", + "a" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "out", + " " + ), + "dynamic", + " ", + "b" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "params", + " " + ), + Doc.Concat( + "dynamic", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "c" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Params", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "out", + " " + ), + "dynamic", + " ", + "a", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "2" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "ref", + " " + ), + "dynamic", + " ", + "c", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + Doc.Concat( + "default", + "(", + "dynamic", + ")" + ) + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "params", + " " + ), + Doc.Concat( + "dynamic", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ), + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "c" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "override", + " " + ) + ) + ), + "string", + " ", + "ToString", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "base", + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "base" + ), + Doc.Concat( + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "partial", + " " + ) + ) + ), + "void", + " ", + "OnError", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "partial", + " " + ) + ) + ), + "void", + " ", + "method", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "97d69e8d-6261-4b08-887e-0e114d6218f8", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + Doc.Null + ), + "97d69e8d-6261-4b08-887e-0e114d6218f8" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*[] bug*/", CommentType.MultiLine), + Doc.TrailingComment("// YES []", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "var", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "2", + ",", + Doc.Line, + "3", + ",", + Doc.Line, + "4", + ",", + Doc.Line, + "5" + ) + ), + Doc.Line, + "}" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*,;*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "i", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "35724e53-144e-4828-b165-68b49733abd4", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "a", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "i" + ), + Doc.SoftLine, + "]" + ) + ), + "35724e53-144e-4828-b165-68b49733abd4" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*[]*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Foo", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "T" + ), + Doc.Null, + ">" + ) + ), + " ", + "f", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Group( + "Foo", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*<> ()*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "f", + Doc.Concat( + ".", + "method" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "f" + ), + Doc.Concat( + Doc.Concat( + ".", + "method" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*().*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + Doc.Group( + "i", + Doc.Indent( + Doc.Concat( + Doc.Line, + "+", + " ", + "i" + ), + Doc.Concat( + Doc.Line, + "-", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Concat( + Doc.Line, + "*", + " ", + "i" + ), + Doc.Concat( + Doc.Line, + "/", + " ", + "i" + ), + Doc.Concat( + Doc.Line, + "%", + " ", + "i" + ) + ) + ) + ) + ) + ), + Doc.Indent( + Doc.Line, + "&", + " ", + "i" + ) + ), + Doc.Concat( + Doc.Line, + "|", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "^", + " ", + "i" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*+ - * / % & | ^*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "bool", + " ", + "b", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "true", + Doc.Indent( + Doc.Group( + Doc.Line, + "&", + " ", + "false" + ) + ) + ), + Doc.Concat( + Doc.Line, + "|", + " ", + Doc.Group( + "true", + Doc.Indent( + Doc.Group( + Doc.Line, + "^", + " ", + "false" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*& | ^*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "b", + " " + ), + "=", + Doc.GroupWithId( + "cdc0a259-eb4f-4d9d-90e2-1d7d85cb385a", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "!", + "b" + ), + "cdc0a259-eb4f-4d9d-90e2-1d7d85cb385a" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*!*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "=", + Doc.GroupWithId( + "9422ddba-c3df-4bd2-be86-b9411856bd6d", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "~", + "i" + ), + "9422ddba-c3df-4bd2-be86-b9411856bd6d" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*~i*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "b", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "<", + " ", + "i" + ) + ) + ), + Doc.Concat( + Doc.Line, + "&&", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + ">", + " ", + "i" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*< && >*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + " ", + "ii", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "5" + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*? bug*/", CommentType.MultiLine), + Doc.TrailingComment("// NO ?", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "f", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "70f45016-1c23-4b08-ace9-c4a99e877a0e", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Null, + "true", + Doc.Indent( + Doc.Line, + Doc.Concat( + "?", + " " + ), + "1", + Doc.Line, + Doc.Concat( + ":", + " " + ), + "0" + ) + ), + "70f45016-1c23-4b08-ace9-c4a99e877a0e" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*? :*/", CommentType.MultiLine), + Doc.TrailingComment("// YES :", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "i", + "++" + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*++*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "i", + "--" + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*--*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "b", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "true", + Doc.Indent( + Doc.Group( + Doc.Line, + "&&", + " ", + "false" + ) + ) + ), + Doc.Concat( + Doc.Line, + "||", + " ", + "true" + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*&& ||*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "<<", + " ", + "5" + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*<<*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + ">>", + " ", + "5" + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*>>*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "b", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "==", + " ", + "i" + ) + ) + ), + Doc.Concat( + Doc.Line, + "&&", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "!=", + " ", + "i" + ) + ) + ) + ), + Doc.Concat( + Doc.Line, + "&&", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "<=", + " ", + "i" + ) + ) + ) + ), + Doc.Concat( + Doc.Line, + "&&", + " ", + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + ">=", + " ", + "i" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*= == && != <= >=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "+=", + Doc.Group( + Doc.Indent( + Doc.Line, + "5.0" + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*+=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "-=", + Doc.GroupWithId( + "34c61dad-f8d1-4a72-896e-caae5c4fb76d", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "34c61dad-f8d1-4a72-896e-caae5c4fb76d" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*-=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "*=", + Doc.GroupWithId( + "cdb632b9-e4d0-4191-a3c8-056ac9ec6750", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "cdb632b9-e4d0-4191-a3c8-056ac9ec6750" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/* *=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "/=", + Doc.GroupWithId( + "ba200a86-ed20-4867-a181-6ca12b7f6412", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "ba200a86-ed20-4867-a181-6ca12b7f6412" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*/=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "%=", + Doc.GroupWithId( + "c70d5cff-d5cd-45d2-8d15-2ad024411481", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "c70d5cff-d5cd-45d2-8d15-2ad024411481" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*%=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "&=", + Doc.GroupWithId( + "5b36cea2-bc51-4db6-a76c-d9a449dabef3", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "5b36cea2-bc51-4db6-a76c-d9a449dabef3" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*&=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "|=", + Doc.GroupWithId( + "cc437271-0d7d-4f1c-8261-8d24107b8bc9", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "cc437271-0d7d-4f1c-8261-8d24107b8bc9" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*|=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "^=", + Doc.GroupWithId( + "c20476bd-7370-4944-a643-366ccf947ff5", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "c20476bd-7370-4944-a643-366ccf947ff5" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*^=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + "<<=", + Doc.GroupWithId( + "5452f0d3-4fd8-408a-9e52-6fc1816342b7", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "5452f0d3-4fd8-408a-9e52-6fc1816342b7" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*<<=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "i", + " " + ), + ">>=", + Doc.GroupWithId( + "38758ecb-3312-432a-b880-512ffb6e4044", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "i", + "38758ecb-3312-432a-b880-512ffb6e4044" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*>>=*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "object", + " ", + "s", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "29f6795a-a7a9-479d-8bd9-3107a9d2e289", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Null, + "x", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + "x", + Doc.Group( + Doc.Line, + "+", + " ", + "1" + ) + ) + ) + ), + "29f6795a-a7a9-479d-8bd9-3107a9d2e289" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*=>*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "double", + " ", + "d", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + ".3" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "Point", + " ", + "point", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + "unsafe", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "Point", + "*" + ), + " ", + "p", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "6f4d2cc7-f94a-4ec6-b35b-fc043446df99", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "&", + "point" + ), + "6f4d2cc7-f94a-4ec6-b35b-fc043446df99" + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/* * &*/", CommentType.MultiLine) + ) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Group( + "p", + Doc.Concat( + "->", + "x" + ) + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "10" + ) + ) + ), + Doc.Concat( + ";", + Doc.Concat( + " ", + Doc.TrailingComment("/*->*/", CommentType.MultiLine) + ) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "IO", + "::", + "BinaryReader" + ), + " ", + "br", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "x", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "i", + Doc.Concat( + ":", + " " + ) + ), + "1" + ) + ), + Doc.SoftLine, + "]" + ) + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "3" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "x", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "i", + Doc.Concat( + ":", + " " + ) + ), + "1" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "j", + Doc.Concat( + ":", + " " + ) + ), + "5" + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"str\"" + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "struct", + " " + ), + "Point", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Group( + "int", + " ", + "X", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Group( + "int", + " ", + "Y", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "ThisAccess", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "this", + " " + ), + "=", + Doc.GroupWithId( + "f87e41ec-7f62-4481-9d95-6e9dd7f6fd11", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "this", + "f87e41ec-7f62-4481-9d95-6e9dd7f6fd11" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// From here:https://github.com/dotnet/roslyn/wiki/New-Language-Features-in-C%23-6", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "class", + " " + ), + "CSharp6Features", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Initializers for auto-properties", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "public" + ), + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "First", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ), + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "set", + ";" + ) + ), + " ", + "}" + ), + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "\"Jane\"" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "Last", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ), + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "set", + ";" + ) + ), + " ", + "}" + ), + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "\"Doe\"" + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Getter-only auto-properties", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "public" + ), + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "Third", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ) + ), + " ", + "}" + ), + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "\"Jane\"" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "Fourth", + Doc.Group( + " ", + "{", + Doc.Indent( + Doc.Concat( + " ", + Doc.Null, + Doc.Null, + "get", + ";" + ) + ), + " ", + "}" + ), + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "\"Doe\"" + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.LeadingComment("// Expression bodies on method-like members", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "Point", + " ", + "Move", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + " ", + "dx" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "dy" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Point", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "x", + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + "dx" + ) + ) + ), + ",", + Doc.Line, + Doc.Group( + "y", + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + "dy" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "Complex", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "+", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "Complex", + " ", + "a" + ), + ",", + Doc.Line, + Doc.Concat( + "Complex", + " ", + "b" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.ConditionalGroup( + Doc.Concat( + "a", + Doc.Concat( + ".", + "Add" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "b" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "a" + ), + Doc.Concat( + Doc.Concat( + ".", + "Add" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "b" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + Doc.Concat( + "implicit", + " " + ), + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "string", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "Person", + " ", + "p" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.Group( + Doc.Group( + "p", + Doc.Concat( + ".", + "First" + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "\" \"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Group( + "p", + Doc.Concat( + ".", + "Last" + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "Print", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.Group( + "Console", + Doc.Concat( + ".", + "WriteLine" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "First", + Doc.Indent( + Doc.Concat( + Doc.Line, + "+", + " ", + "\" \"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "Last" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Expression bodies on property-like function members", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "public" + ), + " " + ), + Doc.Null, + "string", + " ", + Doc.Null, + "Name", + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.Group( + "First", + Doc.Concat( + Doc.Line, + "+", + " ", + "\" \"" + ), + Doc.Concat( + Doc.Line, + "+", + " ", + "Last" + ) + ) + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "public", + " " + ), + Doc.Null, + "int", + " ", + Doc.Null, + Doc.Concat( + "this", + Doc.Concat( + "[", + Doc.Concat( + "long", + " ", + "id" + ), + "]" + ) + ), + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + "id" + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "async", + " ", + Doc.Null + ), + "void", + " ", + "Test", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Using static", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "WriteLine" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "Sqrt", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "3", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "3" + ) + ) + ), + Doc.Indent( + Doc.Line, + "+", + " ", + Doc.Group( + "4", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "4" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Sqrt", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "3", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "3" + ) + ) + ), + Doc.Indent( + Doc.Line, + "+", + " ", + Doc.Group( + "4", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "4" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Using static", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "WriteLine" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "Sqrt", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "3", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "3" + ) + ) + ), + Doc.Indent( + Doc.Line, + "+", + " ", + Doc.Group( + "4", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "4" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Sqrt", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "3", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "3" + ) + ) + ), + Doc.Indent( + Doc.Line, + "+", + " ", + Doc.Group( + "4", + Doc.Indent( + Doc.Group( + Doc.Line, + "*", + " ", + "4" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "Friday", + Doc.Indent( + Doc.Group( + Doc.Line, + "-", + " ", + "Monday" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "Friday", + Doc.Indent( + Doc.Group( + Doc.Line, + "-", + " ", + "Monday" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "range", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "8ad9c0a0-e9d0-4a76-8520-0d4930b8c919", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.ConditionalGroup( + Doc.Concat( + "Range", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "5", + ",", + Doc.Line, + "17" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Range", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "5", + ",", + Doc.Line, + "17" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + "8ad9c0a0-e9d0-4a76-8520-0d4930b8c919" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// Ok: not extension", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "even", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "ffc8f92b-9e95-4a9e-8d86-fe2d14e5134a", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "range", + Doc.Concat( + ".", + "Where" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + "i", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "i", + Doc.Indent( + Doc.Group( + Doc.Line, + "%", + " ", + "2" + ) + ) + ), + Doc.Concat( + Doc.Line, + "==", + " ", + "0" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + "ffc8f92b-9e95-4a9e-8d86-fe2d14e5134a" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// Ok", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Null-conditional operators", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "int" + ), + "?" + ), + " ", + "length", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "b54d42f4-5e4b-48af-80d7-fcc073aee865", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "customers", + "?", + Doc.Concat( + ".", + "Length" + ) + ), + "b54d42f4-5e4b-48af-80d7-fcc073aee865" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// null if customers is null", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "Customer", + " ", + "first", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "cd477baa-8b19-4d15-8b85-374cd356c41b", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "customers", + "?", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ), + "cd477baa-8b19-4d15-8b85-374cd356c41b" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// null if customers is null", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "length", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "customers", + "?", + Doc.Concat( + ".", + "Length" + ) + ), + Doc.Group( + Doc.Line, + "??", + " ", + "0" + ) + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// 0 if customers is null", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + " ", + "first", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "9f64f8e9-9208-4dd7-a99e-9f58bc6fedd3", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "customers", + "?", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ), + "?", + Doc.Concat( + ".", + "Orders" + ), + "?", + Doc.Concat( + ".", + "Count" + ), + Doc.Group( + "(", + ")" + ) + ), + "9f64f8e9-9208-4dd7-a99e-9f58bc6fedd3" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "PropertyChanged", + "?", + Doc.Concat( + ".", + "Invoke" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "this", + ",", + Doc.Line, + "args" + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// String interpolation", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "string" + ), + " ", + "s", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + Doc.Concat( + "{", + Doc.Group( + "p", + Doc.Concat( + ".", + "Name" + ) + ), + Doc.Concat( + ",", + " " + ), + "20", + "}" + ), + " is ", + Doc.Concat( + "{", + Doc.Group( + "p", + Doc.Concat( + ".", + "Age" + ) + ), + ":", + "D3", + "}" + ), + " year{{s}} old #", + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "s", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + Doc.Concat( + "{", + Doc.Group( + "p", + Doc.Concat( + ".", + "Name" + ) + ), + "}" + ), + " is \\"", + Doc.Concat( + "{", + Doc.Group( + "p", + Doc.Concat( + ".", + "Age" + ) + ), + "}" + ), + " year", + Doc.Concat( + "{", + Doc.Group( + "(", + Doc.Indent( + "", + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "p", + Doc.Concat( + ".", + "Age" + ) + ), + Doc.Group( + " ", + "==", + " ", + "1" + ) + ), + Doc.Indent( + " ", + Doc.Concat( + "?", + " " + ), + "\"\"", + " ", + Doc.Concat( + ":", + " " + ), + "\"s\"" + ) + ) + ), + "", + ")" + ), + "}" + ), + " old", + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "s", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + Doc.Concat( + "{", + Doc.Group( + "(", + Doc.Indent( + "", + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "p", + Doc.Concat( + ".", + "Age" + ) + ), + Doc.Group( + " ", + "==", + " ", + "2" + ) + ), + Doc.Indent( + " ", + Doc.Concat( + "?", + " " + ), + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + Doc.Concat( + "{", + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Person", + Doc.Null, + Doc.Concat( + " ", + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + " ", + Doc.Null + ), + Doc.Null, + "}" + ) + ) + ), + "}" + ), + "\"" + ) + ), + " ", + Doc.Concat( + ":", + " " + ), + "\"\"" + ) + ) + ), + "", + ")" + ), + "}" + ), + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "s", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$@\"", + "\", + Doc.Concat( + "{", + Doc.Group( + "p", + Doc.Concat( + ".", + "Name" + ) + ), + "}" + ), + Doc.Concat( + "", + Doc.LiteralLine, + " \"\"\" + ), + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "s", + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.ForceFlat( + "$\"", + "Color [ R=", + Doc.Concat( + "{", + Doc.ConditionalGroup( + Doc.Concat( + "func", + Doc.Group( + "(", + Doc.Indent( + "", + Doc.Concat( + Doc.Concat( + "b", + Doc.Concat( + ":", + " " + ) + ), + "3" + ) + ), + "", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "func", + Doc.Group( + "(", + Doc.Indent( + "", + Doc.Concat( + Doc.Concat( + "b", + Doc.Concat( + ":", + " " + ) + ), + "3" + ) + ), + "", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ":", + "#0.##", + "}" + ), + ", G=", + Doc.Concat( + "{", + "G", + ":", + "#0.##", + "}" + ), + ", B=", + Doc.Concat( + "{", + "B", + ":", + "#0.##", + "}" + ), + ", A=", + Doc.Concat( + "{", + "A", + ":", + "#0.##", + "}" + ), + " ]", + "\"" + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// nameof expressions", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "if" + ), + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "x", + Doc.Group( + Doc.Line, + "==", + " ", + "null" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "throw", + Doc.Concat( + " ", + Doc.Group( + Doc.Concat( + "new", + " " + ), + "ArgumentNullException", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "x" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "x" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "person", + Doc.Concat( + ".", + "Address" + ), + Doc.Concat( + ".", + "ZipCode" + ) + ), + Doc.Concat( + Doc.Concat( + "person" + ), + Doc.Null, + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + ".", + "Address" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "ZipCode" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "person", + Doc.Concat( + ".", + "Address" + ), + Doc.Concat( + ".", + "ZipCode" + ) + ), + Doc.Concat( + Doc.Concat( + "person" + ), + Doc.Null, + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + ".", + "Address" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "ZipCode" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "person", + Doc.Concat( + ".", + "Address" + ), + Doc.Concat( + ".", + "ZipCode" + ) + ), + Doc.Concat( + Doc.Concat( + "person" + ), + Doc.Null, + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + ".", + "Address" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "ZipCode" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "nameof", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.ConditionalGroup( + Doc.Concat( + "person", + Doc.Concat( + ".", + "Address" + ), + Doc.Concat( + ".", + "ZipCode" + ) + ), + Doc.Concat( + Doc.Concat( + "person" + ), + Doc.Null, + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Concat( + ".", + "Address" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "ZipCode" + ) + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// prints "ZipCode"", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Index initializers", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "var" + ), + " ", + "numbers", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "45171546-5aca-40b9-82e7-c2ae1c9c4fcb", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Group( + "Dictionary", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + ",", + Doc.Line, + "string" + ) + ), + Doc.SoftLine, + ">" + ) + ), + Doc.Null, + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Null, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Group( + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "7" + ), + Doc.SoftLine, + "]" + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"seven\"" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Group( + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "9" + ), + Doc.SoftLine, + "]" + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"nine\"" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Group( + Doc.Group( + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "13" + ), + Doc.SoftLine, + "]" + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"thirteen\"" + ) + ) + ) + ) + ), + Doc.HardLine, + "}" + ) + ) + ), + "45171546-5aca-40b9-82e7-c2ae1c9c4fcb" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Exception filters", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "try" + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.HardLine, + Doc.Concat( + "catch", + Doc.Group( + Doc.Concat( + " ", + "(", + "MyException", + " ", + "e", + ")" + ), + Doc.Indent( + Doc.Line, + Doc.Concat( + "when", + " " + ), + "(", + Doc.Group( + Doc.Indent( + Doc.ConditionalGroup( + Doc.Concat( + "myfilter", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "e" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "myfilter", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "e" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + Doc.SoftLine + ), + ")" + ) + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Await in catch and finally blocks", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "Resource" + ), + " ", + "res", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "try", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "res", + " " + ), + "=", + Doc.GroupWithId( + "f3b281e1-f50c-4bf7-b1b3-44990d77c987", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.Group( + "Resource", + Doc.Concat( + ".", + "OpenAsync" + ), + Doc.Group( + "(", + ")" + ) + ) + ), + "f3b281e1-f50c-4bf7-b1b3-44990d77c987" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// You could do this.", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.HardLine, + Doc.Concat( + "catch", + Doc.Group( + Doc.Concat( + " ", + "(", + "ResourceException", + " ", + "e", + ")" + ), + Doc.Null + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.Group( + "Resource", + Doc.Concat( + ".", + "LogAsync" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "res", + ",", + Doc.Line, + "e" + ) + ), + Doc.SoftLine, + ")" + ) + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// Now you can do this …", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Concat( + "finally", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "res", + Doc.Group( + Doc.Line, + "!=", + " ", + "null" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "res", + Doc.Concat( + ".", + "CloseAsync" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "res" + ), + Doc.Concat( + Doc.Concat( + ".", + "CloseAsync" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// … and this.", CommentType.SingleLine) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.AlwaysFits( + Doc.Concat( + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#line 6"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#line 2 \"test.cs\""), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#line default"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.HardLineIfNoPreviousLineSkipBreakIfFirstInGroup, + Doc.Trim, + Doc.Directive("#line hidden"), + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.HardLineSkipBreakIfFirstInGroup + ) + ), + "class", + " " + ), + "CSharp70", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "PatternMatching", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "string", + " ", + "arg" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "b" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "switch", + " ", + "(", + Doc.GroupWithId( + "cb4ba951-3577-4951-a51e-3ea65cab8d0e", + Doc.Indent( + Doc.SoftLine, + "arg" + ), + Doc.SoftLine + ), + ")", + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + "case", + " " + ), + "\"A\"", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + "when", + " " + ), + Doc.Group( + "b", + Doc.Indent( + Doc.Group( + Doc.Line, + ">", + " ", + "50" + ) + ) + ) + ) + ), + ":" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Concat( + "case", + " " + ), + "\"B\"", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + "when", + " " + ), + Doc.Group( + "b", + Doc.Indent( + Doc.Group( + Doc.Line, + "<", + " ", + "50" + ) + ) + ) + ) + ), + ":" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + "default", + ":" + ) + ), + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + "break", + ";" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Group( + Doc.Group( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "A", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "B", + ",", + Doc.Line, + "C" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "D" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "E", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "F", + ",", + Doc.Line, + "G" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "H" + ) + ) + ), + Doc.SoftLine, + ")" + ), + " " + ), + "=", + Doc.GroupWithId( + "300b82f1-94ad-4242-9aa7-a2c24e86888d", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "e", + "300b82f1-94ad-4242-9aa7-a2c24e86888d" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "x", + "?", + Doc.Concat( + ".", + "y" + ), + "?", + Doc.Concat( + ".", + "z" + ) + ), + Doc.Line, + "is", + " ", + Doc.Concat( + "Type", + " ", + "value2" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + " ", + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Indent( + Doc.LeadingComment("// code using value", CommentType.SingleLine), + Doc.Null + ), + Doc.HardLine + ), + "}" + ) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + "expr", + Doc.Line, + "is", + " ", + Doc.Concat( + "Type", + " ", + "v" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ), + Doc.Concat( + "async", + " " + ) + ) + ), + "Task", + " ", + "LocalFunctions", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "string", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "args" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Group( + "string", + " ", + "Hello2", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + " ", + "i" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + "args", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "i" + ), + Doc.SoftLine, + "]" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Null, + Doc.Group( + Doc.Group( + "async", + " ", + Doc.Null + ), + Doc.Group( + "Task", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "string" + ), + Doc.Null, + ">" + ) + ), + " ", + "Hello", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "T", + " ", + "i" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "Task", + Doc.Concat( + ".", + "FromResult" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "args", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "i" + ), + Doc.SoftLine, + "]" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Task" + ), + Doc.Concat( + Doc.Concat( + ".", + "FromResult" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "args", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "i" + ), + Doc.SoftLine, + "]" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + Doc.Concat( + "await", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "void", + " ", + "OutVar", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "string", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + " ", + "args" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "int", + Doc.Concat( + ".", + "TryParse" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + Doc.Concat( + "var", + " ", + "item" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "int" + ), + Doc.Concat( + Doc.Concat( + ".", + "TryParse" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + Doc.Concat( + "var", + " ", + "item" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "int", + Doc.Concat( + ".", + "TryParse" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + Doc.Concat( + "int", + " ", + "item" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "int" + ), + Doc.Concat( + Doc.Concat( + ".", + "TryParse" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.ConditionalGroup( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Hello", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "out", + " " + ), + Doc.Concat( + "int", + " ", + "item" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "ThrowExpression", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "result", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "nullableResult", + Doc.Group( + Doc.Line, + "??", + " ", + Doc.Concat( + Doc.Concat( + "throw", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "NullReferenceException", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ) + ) + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "BinaryLiterals", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "nineteen", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0b10011" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "DigitSeparators", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "bin", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0b1001_1010_0001_0100" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "hex", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0x1b_a0_44_fe" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "dec", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "33_554_432" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "weird", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1_2__3___4____5_____6______7_______8________9" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "double", + " ", + "real", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "1_000.111_1e-1_000" + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "CSharp71", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "DefaultWithoutTypeName", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "string", + " ", + "content", + Doc.Indent( + Doc.Group( + " ", + Doc.Concat( + "=", + Doc.Line + ), + "default" + ) + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DefaultWithoutTypeName", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "default" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DefaultWithoutTypeName", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "default" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "TupleRecognize", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + " ", + "a" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + "int", + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + " ", + "b" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + "int", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + "int", + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + "?" + ), + " ", + "c" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "result", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "5b0f7e3c-a9b9-4ffb-9857-f369c86b6388", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.ConditionalGroup( + Doc.Concat( + "list", + Doc.Concat( + ".", + "Select" + ), + Doc.Group( + Doc.Indent( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + "c", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "c", + Doc.Concat( + ".", + "f1" + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "f3", + Doc.Concat( + ":", + " " + ) + ), + Doc.Group( + "c", + Doc.Concat( + ".", + "f2" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + ".", + "Where" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + "t", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "t", + Doc.Concat( + ".", + "f2" + ) + ), + Doc.Group( + Doc.Line, + "==", + " ", + "1" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "list" + ), + Doc.Concat( + Doc.Concat( + ".", + "Select" + ), + Doc.Group( + Doc.Indent( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + "c", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "c", + Doc.Concat( + ".", + "f1" + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "f3", + Doc.Concat( + ":", + " " + ) + ), + Doc.Group( + "c", + Doc.Concat( + ".", + "f2" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ), + Doc.Indent( + Doc.Group( + Doc.HardLine, + Doc.Group( + Doc.Concat( + ".", + "Where" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + "t", + " ", + "=>", + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Group( + "t", + Doc.Concat( + ".", + "f2" + ) + ), + Doc.Group( + Doc.Line, + "==", + " ", + "1" + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ) + ) + ) + ), + "5b0f7e3c-a9b9-4ffb-9857-f369c86b6388" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "CSharp72", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + "readonly", + " " + ), + Doc.Concat( + "struct", + " " + ), + "ReadonlyRef1", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Func", + Doc.Concat( + "<", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "int", + ",", + Doc.Line, + "int" + ) + ), + Doc.SoftLine, + ">" + ) + ), + " ", + "s", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "da4df76b-af68-4d43-b36e-d2722d02477e", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + "in", + " " + ), + "int", + " ", + "x" + ) + ), + Doc.SoftLine + ), + ")" + ), + " ", + "=>", + Doc.Group( + Doc.Indent( + Doc.Line, + "x" + ) + ) + ), + "da4df76b-af68-4d43-b36e-d2722d02477e" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Null, + "TValue" + ), + " ", + Doc.Null, + Doc.Concat( + "this", + Doc.Concat( + "[", + Doc.Concat( + Doc.Group( + "in", + " " + ), + "TKey", + " ", + "index" + ), + "]" + ) + ), + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + "null" + ) + ), + Doc.Null, + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "Vector3", + " ", + Doc.Null, + Doc.Concat( + "operator", + " " + ), + Doc.Null, + "+", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "in", + " " + ), + "Vector3", + " ", + "x" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "in", + " " + ), + "Vector3", + " ", + "y" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + " ", + Doc.Concat( + "=>", + Doc.Line + ), + "null" + ) + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Concat( + Doc.Concat( + "readonly", + " " + ) + ) + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Null, + "Vector3" + ), + " ", + "M1_Trace", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// OK", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "ref", + " " + ), + Doc.Concat( + "readonly", + " " + ), + "var" + ), + " ", + "r1", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "96cc4b6e-f070-4e8a-b5c8-240ee92d54b7", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.ConditionalGroup( + Doc.Concat( + "M1", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "M1", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ) + ), + "96cc4b6e-f070-4e8a-b5c8-240ee92d54b7" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Not valid. Need an LValue", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "ref", + " " + ), + Doc.Concat( + "readonly", + " " + ), + "Vector3" + ), + " ", + "r2", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "193295c4-2a9f-4cd9-b510-3809bd612fe1", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "default", + "(", + "Vector3", + ")" + ) + ), + "193295c4-2a9f-4cd9-b510-3809bd612fe1" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Not valid. r1 is readonly.", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "Mutate" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "r1" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// Not valid. r1 is readonly.", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "Mutate" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "r1" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// OK.", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "Print" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "in", + " " + ), + "r1" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// OK.", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "Print" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "in", + " " + ), + "r1" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// OK.", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "r1" + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "ref", + " " + ), + Doc.Concat( + "struct", + " " + ), + "ReadonlyRef2", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "readonly", + " " + ), + "Guid" + ), + " ", + "Test", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Group( + "in", + " " + ), + "Vector3", + " ", + "v1" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "in", + " " + ), + "Vector3", + " ", + "v2" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// not OK!!", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "v1" + ), + " " + ), + "=", + Doc.GroupWithId( + "53d5a0ef-8d05-4b11-985d-476c5e77e0a3", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "default", + "(", + "Vector3", + ")" + ), + "53d5a0ef-8d05-4b11-985d-476c5e77e0a3" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Group( + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// not OK!!", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "v1" + ), + Doc.Concat( + ".", + "X" + ) + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "0" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.ConditionalGroup( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// not OK!!", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "foo" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Group( + "v1", + Doc.Concat( + ".", + "X" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// not OK!!", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "foo" + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Group( + "v1", + Doc.Concat( + ".", + "X" + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + Doc.Group( + "arr", + Doc.Group( + Doc.Line, + "!=", + " ", + "null" + ) + ), + Doc.Indent( + Doc.Line, + Doc.Concat( + "?", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "arr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ) + ), + Doc.Line, + Doc.Concat( + ":", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "otherArr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Span", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "span", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "1" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + "" + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// OK", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "return", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Vector3", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Group( + Doc.Group( + "v1", + Doc.Concat( + ".", + "X" + ) + ), + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + Doc.Group( + "v2", + Doc.Concat( + ".", + "X" + ) + ) + ) + ) + ), + ",", + Doc.Line, + Doc.Group( + Doc.Group( + "v1", + Doc.Concat( + ".", + "Y" + ) + ), + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + Doc.Group( + "v2", + Doc.Concat( + ".", + "Y" + ) + ) + ) + ) + ), + ",", + Doc.Line, + Doc.Group( + Doc.Group( + "v1", + Doc.Concat( + ".", + "Z" + ) + ), + Doc.Indent( + Doc.Group( + Doc.Line, + "+", + " ", + Doc.Group( + "v2", + Doc.Concat( + ".", + "Z" + ) + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Null, + "T" + ), + " ", + "Choice", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "bool", + " ", + "condition" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "ref", + " " + ), + "T", + " ", + "consequence" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "ref", + " " + ), + "T", + " ", + "alternative" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + "condition" + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "consequence" + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.HardLine, + Doc.Concat( + "else", + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + "alternative" + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "DoSomething", + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "bool", + " ", + "isEmployed" + ), + ",", + Doc.Line, + Doc.Concat( + "string", + " ", + "personName" + ), + ",", + Doc.Line, + Doc.Concat( + "int", + " ", + "personAge" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Concat( + " ", + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "NonTrailingNamedArguments", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ), + ",", + Doc.Line, + "name", + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ), + ",", + Doc.Line, + "name", + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// currently CS1738, but would become legal", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "true", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personName", + Doc.Concat( + ":", + " " + ) + ), + "name" + ), + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "true", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personName", + Doc.Concat( + ":", + " " + ) + ), + "name" + ), + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// currently CS1738, but would become legal", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "name", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ), + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "name", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ), + ",", + Doc.Line, + "age" + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// remains illegal", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "name", + ",", + Doc.Line, + "age", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "name", + ",", + Doc.Line, + "age", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "isEmployed", + Doc.Concat( + ":", + " " + ) + ), + "true" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// remains illegal", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "true", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personAge", + Doc.Concat( + ":", + " " + ) + ), + "age" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personName", + Doc.Concat( + ":", + " " + ) + ), + "name" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "DoSomething", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "true", + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personAge", + Doc.Concat( + ":", + " " + ) + ), + "age" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Concat( + "personName", + Doc.Concat( + ":", + " " + ) + ), + "name" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// already legal", CommentType.SingleLine) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "ConditionalRef", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Null, + "var" + ), + " ", + "r", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "953af41e-e84e-4486-aaef-47f1255f093a", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Null, + Doc.Group( + "arr", + Doc.Group( + Doc.Line, + "!=", + " ", + "null" + ) + ), + Doc.Indent( + Doc.Line, + Doc.Concat( + "?", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "arr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ) + ), + Doc.Line, + Doc.Concat( + ":", + " " + ), + Doc.Concat( + Doc.Concat( + "ref", + " " + ), + Doc.Concat( + "otherArr", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "0" + ), + Doc.SoftLine, + "]" + ) + ) + ) + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + "953af41e-e84e-4486-aaef-47f1255f093a" + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "LeadingSeparator", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "res", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "0", + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "123", + Doc.TrailingComment("// permitted in C# 1.0 and later", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "1_2_3", + Doc.TrailingComment("// permitted in C# 7.0 and later", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "0x1_2_3", + Doc.TrailingComment("// permitted in C# 7.0 and later", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "0b101", + Doc.TrailingComment("// binary literals added in C# 7.0", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "0b1_0_1", + Doc.TrailingComment("// permitted in C# 7.0 and later", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + Doc.Concat( + Doc.Concat( + Doc.LeadingComment("// in C# 7.2, _ is permitted after the `0x` or `0b`", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup + ), + "+" + ), + " ", + Doc.Concat( + "0x_1_2", + Doc.TrailingComment("// permitted in C# 7.2 and later", CommentType.SingleLine) + ) + ), + Doc.Concat( + Doc.Line, + "+", + " ", + Doc.Concat( + "0b_1_0_1", + Doc.TrailingComment("// permitted in C# 7.2 and later", CommentType.SingleLine) + ) + ) + ) + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "CSharp73", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Blittable", + Doc.Group( + "<", + Doc.Indent( + Doc.Null, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + "T" + ) + ), + Doc.Null, + ">" + ), + Doc.Group( + "(", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "T", + " ", + "value" + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Concat( + "where", + " " + ), + "T", + " ", + Doc.Concat( + ":", + " " + ), + Doc.Indent( + "unmanaged" + ) + ) + ) + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "unmanaged", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "666" + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Group( + "unsafe", + " " + ), + Doc.Concat( + "struct", + " " + ), + "IndexingMovableFixed", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + "public", + " ", + "fixed" + ), + " " + ), + Doc.Group( + "int", + " ", + "myFixedField", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "10" + ), + Doc.SoftLine, + "]" + ) + ), + ";" + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "static", + " " + ), + Doc.Group( + "IndexingMovableFixed", + " ", + "s", + Doc.Null + ), + ";" + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "unsafe", + " " + ) + ) + ), + "void", + " ", + "IndexingMovableFixedFields", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "int", + "*" + ), + " ", + "ptr", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "aa1a65d2-15b9-4101-9735-a81a46b82734", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + "s", + Doc.Concat( + ".", + "myFixedField" + ) + ), + "aa1a65d2-15b9-4101-9735-a81a46b82734" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "int", + " ", + "t", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "94f17906-f5c1-41fc-a502-6b5e6ead23c6", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Group( + "s", + Doc.Concat( + ".", + "myFixedField" + ) + ), + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "5" + ), + Doc.SoftLine, + "]" + ) + ), + "94f17906-f5c1-41fc-a502-6b5e6ead23c6" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "PatternBasedFixed", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "fixed", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "byte", + "*" + ), + " ", + "ptr", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "f5b72adc-f7eb-4309-8f65-dbbcbc0b48ae", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "byteArray", + "f5b72adc-f7eb-4309-8f65-dbbcbc0b48ae" + ) + ) + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Group( + Doc.Line, + "{", + " ", + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Indent( + Doc.LeadingComment("// ptr is a native pointer to the first element of the array", CommentType.SingleLine), + Doc.Null, + Doc.HardLineSkipBreakIfFirstInGroup, + Doc.LeadingComment("// byteArray is protected from being moved/collected by the GC for the duration of this block", CommentType.SingleLine), + Doc.Null + ), + Doc.HardLine + ), + "}" + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "StackallocArrayInitializer", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Span", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "3" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + "" + ) + ) + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// currently allowed", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Span", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Group( + "[", + Doc.Concat( + Doc.Indent( + Doc.SoftLine, + "3" + ), + Doc.SoftLine + ), + "]" + ) + ) + ), + Doc.Concat( + " ", + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "2", + ",", + Doc.Line, + "3" + ) + ), + Doc.Line, + "}" + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Span", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "stackalloc", + " " + ), + Doc.Concat( + "int", + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + Doc.Concat( + " ", + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "2", + ",", + Doc.Line, + "3" + ) + ), + Doc.Line, + "}" + ) + ) + ) + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Group( + "Span", + Doc.Concat( + "<", + Doc.Concat( + Doc.Null, + "int" + ), + Doc.Null, + ">" + ) + ), + " ", + "a", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "5184f1eb-78a0-4fe0-9da4-a43a09677830", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "stackalloc", + "[", + Doc.Concat( + "]", + " " + ), + Doc.Group( + Doc.Null, + "{", + Doc.Indent( + Doc.Line, + Doc.Concat( + "1", + ",", + Doc.Line, + "2", + ",", + Doc.Line, + "3" + ) + ), + Doc.Line, + "}" + ) + ), + "5184f1eb-78a0-4fe0-9da4-a43a09677830" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Null + ), + "void", + " ", + "TupleEquality", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Concat( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "int", + Doc.Null + ), + ",", + Doc.Line, + Doc.Concat( + "int", + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ) + ) + ), + Doc.SoftLine, + ")" + ), + " ", + Doc.Indent( + "t1", + ",", + Doc.HardLine, + "t2" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "res", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Group( + "t1", + Doc.Group( + Doc.Line, + "==", + " ", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "1", + ",", + Doc.Line, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "2", + ",", + Doc.Line, + "3" + ) + ), + Doc.SoftLine, + ")" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ) + ) + ) + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + "namespace", + " ", + "CSharp80", + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Null, + Doc.Concat( + Doc.Concat( + "class", + " " + ), + "CSharp80ExceptInterfaceDefaultImplement", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "ReferenceNullable", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "var", + "?" + ), + " ", + "x", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "420bf32b-7eeb-42c2-9c2f-ee1e3e3a8724", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + "E", + "420bf32b-7eeb-42c2-9c2f-ee1e3e3a8724" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Concat( + "x", + "!" + ), + Doc.Concat( + ".", + "ToString" + ), + Doc.Group( + "(", + ")" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "string", + "?" + ), + " ", + "wtf", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "null" + ) + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Concat( + Doc.Concat( + "int", + "?" + ), + Doc.Concat( + Doc.Concat( + "[", + Doc.Null, + "]" + ) + ) + ), + "?" + ), + " ", + "hello", + Doc.Null + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Patterns", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "if", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + "o", + Doc.Line, + "is", + " ", + "string" + ), + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Indent( + Doc.Line, + Doc.Group( + Doc.Concat( + "Length", + Doc.Concat( + ":", + " " + ) + ), + "5" + ) + ), + Doc.Line, + "}" + ), + " ", + "s" + ) + ) + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "Do", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "Do", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.HardLine, + Doc.Concat( + "return", + " " + ), + Doc.Concat( + Doc.Group( + "lang", + Doc.Concat( + ".", + "CountOfTokens" + ) + ), + " ", + "switch", + Doc.HardLine, + "{", + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "1", + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + "100" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "2", + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + "200" + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "_", + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + Doc.Concat( + Doc.Concat( + "throw", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + Doc.Concat( + Doc.Concat( + "global", + "::", + "System" + ), + ".", + "Exception" + ), + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "newState", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "4db6b10f-9668-4e80-98f6-911a47bafd27", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.ConditionalGroup( + Doc.Concat( + "GetState", + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "GetState", + Doc.Group( + "(", + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ",", + Doc.Line, + "action", + ",", + Doc.Line, + "hasKey" + ) + ), + Doc.SoftLine, + ")" + ), + " ", + "switch", + Doc.HardLine, + "{", + Doc.Group( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Closed" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + "Action", + Doc.Concat( + ".", + "Open" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "_" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Opened" + ) + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Opened" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + "Action", + Doc.Concat( + ".", + "Close" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "_" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Closed" + ) + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Closed" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + "Action", + Doc.Concat( + ".", + "Lock" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "true" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Locked" + ) + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Locked" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + Doc.Group( + "Action", + Doc.Concat( + ".", + "Unlock" + ) + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "true" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + Doc.Group( + "DoorState", + Doc.Concat( + ".", + "Closed" + ) + ) + ) + ) + ), + ",", + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Concat( + Doc.Concat( + "var", + " " + ), + "state" + ) + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "_" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "_" + ) + ) + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Indent( + Doc.Line, + Doc.Concat( + "=>", + " " + ), + "state" + ) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + "4db6b10f-9668-4e80-98f6-911a47bafd27" + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "async", + " ", + Doc.Null + ), + "Task", + " ", + "AsyncStreams", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "await", + " ", + "foreach", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "var", + " ", + "item" + ), + " ", + "in", + " ", + "asyncEnumerables" + ), + Doc.SoftLine + ), + ")" + ), + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "Ranges", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "thirdItem", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "38c3defe-efc3-4a29-99b6-a2e37c26df18", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + "2" + ), + Doc.SoftLine, + "]" + ) + ), + "38c3defe-efc3-4a29-99b6-a2e37c26df18" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[2]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "lastItem", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "5c09946a-60da-45dd-9d9f-1c09635ea39a", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "^", + "1" + ) + ), + Doc.SoftLine, + "]" + ) + ), + "5c09946a-60da-45dd-9d9f-1c09635ea39a" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Index.CreateFromEnd(1)]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "multiDimensional", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "4d6f0edb-3063-4c0a-9cd4-70fa8ca7fed7", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "3", + ",", + Doc.Line, + Doc.Concat( + "^", + "2" + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + "4d6f0edb-3063-4c0a-9cd4-70fa8ca7fed7" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[3, Index.CreateFromEnd(2)]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.HardLine, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "slice1", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "ec99a039-f7e1-4ca9-86a3-1287ac6c5238", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "2", + "..", + Doc.Concat( + "^", + "3" + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + "ec99a039-f7e1-4ca9-86a3-1287ac6c5238" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Range.Create(2, Index.CreateFromEnd(3))]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "slice2", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "0012177f-cfea-4ed9-9e62-1a825872fd30", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + "..", + Doc.Concat( + "^", + "3" + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + "0012177f-cfea-4ed9-9e62-1a825872fd30" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Range.ToEnd(Index.CreateFromEnd(3))]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "slice3", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "8ed3e83d-e5fb-4c2e-bfcd-79ebc27e7218", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + "2", + "..", + Doc.Null + ) + ), + Doc.SoftLine, + "]" + ) + ), + "8ed3e83d-e5fb-4c2e-bfcd-79ebc27e7218" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Range.FromStart(2)]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "slice4", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "9acb9e4d-5dfc-4bc2-817c-29eaacc503f4", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Null, + "..", + Doc.Null + ) + ), + Doc.SoftLine, + "]" + ) + ), + "9acb9e4d-5dfc-4bc2-817c-29eaacc503f4" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Range.All]", CommentType.SingleLine) + ) + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "multiDimensional", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "075b9e05-bf36-4022-adf9-95bf977de1f5", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Concat( + "list", + Doc.Group( + "[", + Doc.Indent( + Doc.SoftLine, + Doc.Concat( + Doc.Concat( + "1", + "..", + "2" + ), + ",", + Doc.Line, + Doc.Concat( + Doc.Null, + "..", + Doc.Null + ) + ) + ), + Doc.SoftLine, + "]" + ) + ), + "075b9e05-bf36-4022-adf9-95bf977de1f5" + ) + ), + Doc.Concat( + ";", + Doc.TrailingComment("// list[Range.Create(1, 2), Range.All]", CommentType.SingleLine) + ) + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "UsingDeclarators", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Concat( + "using", + " " + ), + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "item", + Doc.Null + ), + " " + ), + "=", + Doc.GroupWithId( + "76552bd9-1276-4acf-834a-a0ed6c4ae827", + Doc.Indent( + Doc.Line + ) + ), + Doc.IndentIfBreak( + Doc.Group( + Doc.Concat( + "new", + " " + ), + "FileStream", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"./.f\"" + ), + Doc.SoftLine, + ")" + ), + Doc.Null + ), + "76552bd9-1276-4acf-834a-a0ed6c4ae827" + ) + ), + ";" + ), + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Group( + "fixed", + " ", + "(", + Doc.Group( + Doc.Indent( + Doc.SoftLine, + Doc.Group( + Doc.Group( + Doc.Concat( + Doc.Concat( + "char", + "*" + ), + " ", + "ch", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + "\"hell\"" + ) + ) + ) + ), + Doc.SoftLine + ), + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Indent( + Doc.HardLine, + ";" + ) + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "item", + Doc.Concat( + ".", + "Dispose" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "item" + ), + Doc.Concat( + Doc.Concat( + ".", + "Dispose" + ), + Doc.Group( + "(", + ")" + ) + ), + Doc.Null + ) + ), + ";" + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "StaticLocalFunction", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Concat( + Doc.Concat( + "unsafe", + " " + ) + ) + ), + "void", + " ", + "Func1", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Concat( + Doc.Concat( + "unsafe", + " " + ) + ) + ), + "void", + " ", + "Func1", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + "async", + " ", + Doc.Concat( + Doc.Concat( + "static", + " " + ) + ) + ), + "void", + " ", + "Func2", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + "static", + " ", + Doc.Concat( + Doc.Concat( + "async", + " " + ) + ) + ), + "void", + " ", + "Func2", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + " ", + "}" + ), + Doc.Null + ) + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "NullCoalescingAssignment", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Concat( + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Null, + Doc.Group( + Doc.Group( + Doc.Concat( + "var", + " ", + "item", + Doc.Null + ), + " " + ), + "=", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Group( + "a", + " " + ), + "??=", + Doc.Line, + Doc.Concat( + Doc.Group( + "b", + " " + ), + "??=", + Doc.Line, + Doc.Concat( + Doc.Group( + "c", + " " + ), + "??=", + Doc.Line, + Doc.Concat( + Doc.Group( + "d", + " " + ), + "??=", + Doc.Indent( + Doc.Line, + Doc.Concat( + Doc.Concat( + "throw", + " " + ), + Doc.Group( + Doc.Concat( + "new", + " " + ), + "Exception", + Doc.Group( + "(", + ")" + ), + Doc.Null + ) + ) + ) + ) + ) + ) + ) + ) + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "public", + " ", + Doc.Concat( + Doc.Concat( + "readonly", + " " + ) + ) + ), + "float", + " ", + "Hello", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Concat( + "return", + " " + ), + "0.1f", + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "interface", + " " + ), + "IA", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "M", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IA.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IA.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "interface", + " " + ), + "IA", + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + "void", + " ", + "M", + "(", + ")", + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IA.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IA.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "interface", + " " + ), + "IB", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + "IA", + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "override", + " ", + Doc.Null + ), + "void", + " ", + "IA", + ".", + "M", + "(", + Doc.Concat( + ")", + Doc.TrailingComment("// explicitly named", CommentType.SingleLine) + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IB.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IB.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ), + Doc.HardLine, + Doc.HardLine, + Doc.Concat( + Doc.Concat( + "interface", + " " + ), + "IC", + Doc.Group( + Doc.Indent( + Doc.Line, + Doc.Concat( + ":", + " ", + "IA", + Doc.Null + ) + ) + ), + Doc.Null, + Doc.HardLine, + "{", + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.Group( + Doc.Group( + "override", + " ", + Doc.Null + ), + "void", + " ", + "M", + "(", + Doc.Concat( + ")", + Doc.TrailingComment("// implicitly named", CommentType.SingleLine) + ), + Doc.IfBreak( + Doc.Null, + Doc.SoftLine + ) + ), + Doc.Null, + Doc.Group( + Doc.Line, + "{", + Doc.Concat( + Doc.Indent( + Doc.HardLine, + Doc.Group( + Doc.Null, + Doc.ConditionalGroup( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IC.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Concat( + Doc.Concat( + "WriteLine", + Doc.Group( + "(", + Doc.Indent( + Doc.SoftLine, + "\"IC.M\"" + ), + Doc.SoftLine, + ")" + ) + ), + Doc.Null, + Doc.Null + ) + ), + ";" + ) + ), + Doc.HardLine + ), + "}" + ), + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLine, + "}", + Doc.Null + ) + ), + Doc.HardLineIfNoPreviousLine +) \ No newline at end of file diff --git a/Src/CSharpier.Tests/Samples/Scratch.test b/Src/CSharpier.Tests/Samples/Scratch.test index 1d8ef2950..5f282702b 100644 --- a/Src/CSharpier.Tests/Samples/Scratch.test +++ b/Src/CSharpier.Tests/Samples/Scratch.test @@ -1 +1 @@ -Doc.HardLineIfNoPreviousLine \ No newline at end of file + \ No newline at end of file diff --git a/Src/CSharpier/XmlFormatter.cs b/Src/CSharpier/XmlFormatter.cs deleted file mode 100644 index f40076234..000000000 --- a/Src/CSharpier/XmlFormatter.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace CSharpier; - -internal class XmlFormatter : IFormatter -{ - public Task FormatAsync( - string code, - PrinterOptions printerOptions, - CancellationToken cancellationToken - ) - { - throw new NotImplementedException(); - } -}