Skip to content

Commit 71f60c4

Browse files
committed
Added C# regions to organize and group options by categories.
1 parent 0602cf4 commit 71f60c4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/Generator/Options.cs

+13-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public DriverOptions()
2828
ExplicitlyPatchedVirtualFunctions = new HashSet<string>();
2929
}
3030

31-
// General options
31+
#region General options
3232

3333
/// <summary>
3434
/// Set to true to enable quiet output mode.
@@ -51,7 +51,9 @@ public DriverOptions()
5151
/// </summary>
5252
public bool CompileCode;
5353

54-
// Parser options
54+
#endregion
55+
56+
#region Parser options
5557

5658
/// <summary>
5759
/// If this option is off (the default), each header is parsed separately
@@ -60,6 +62,8 @@ public DriverOptions()
6062
/// </summary>
6163
public bool UnityBuild { get; set; }
6264

65+
#endregion
66+
6367
#region Module options
6468

6569
public Module SystemModule { get; }
@@ -109,9 +113,15 @@ public string TemplatesLibraryName
109113
set { MainModule.TemplatesLibraryName = value; }
110114
}
111115

116+
public bool DoAllModulesHaveLibraries() =>
117+
Modules.All(m => m == SystemModule || m.Libraries.Count > 0);
118+
119+
#endregion
120+
112121
#endregion
113122

114-
// Generator options
123+
#region Generator options
124+
115125
public GeneratorKind GeneratorKind;
116126

117127
public bool CheckSymbols;
@@ -170,8 +180,6 @@ public string TemplatesLibraryName
170180
/// </summary>
171181
public HashSet<string> ExplicitlyPatchedVirtualFunctions { get; }
172182

173-
public bool DoAllModulesHaveLibraries() =>
174-
Modules.All(m => m == SystemModule || m.Libraries.Count > 0);
175183
}
176184

177185
public class InvalidOptionException : Exception

0 commit comments

Comments
 (0)