This commit is contained in:
h z
2024-07-12 14:32:16 +01:00
parent 3699cb3383
commit 6f05d251cf

View File

@@ -25,13 +25,14 @@ public class DataTypeGenerator : ISourceGenerator
if (types == null)
return;
StringBuilder sb = new();
sb.AppendLine("using Godot;");
sb.AppendLine("using Nocturnis.DataStructures.DataTypes;");
sb.AppendLine("namespace Nocturnis.GlobalManagement.Constants;");
sb.AppendLine("public static partial class DataTypeConstant");
sb.AppendLine("{");
sb.AppendLine(" public static class BaseDataTypeNames");
sb.AppendLine(" {");
sb
.AppendLine("using Godot;")
.AppendLine("using Nocturnis.DataStructures.DataTypes;")
.AppendLine("namespace Nocturnis.GlobalManagement.Constants;")
.AppendLine("public static partial class DataTypeConstant")
.AppendLine("{")
.AppendLine(" public static class BaseDataTypeNames")
.AppendLine(" {");
StringBuilder sxa = new();
foreach (string? type in types)
{
@@ -49,4 +50,4 @@ public class DataTypeGenerator : ISourceGenerator
context.AddSource("DataTypeConstant.g.cs", SourceText.From(sb.ToString(), Encoding.UTF8));
}
}
}
}