Skip to content

Commit

Permalink
Use parent struct name in nested struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lithiumtoast committed Jan 8, 2025
1 parent 05ad42c commit 8b3e4de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private ImmutableArray<string> GenerateCodeStructMembers(
{
var fieldNameCSharpParts = fieldNameCSharp.Split('_', StringSplitOptions.RemoveEmptyEntries)
.Select(x => $"{x[0].ToString().ToUpperInvariant()}{x.AsSpan(1)}");
var nestedStructName = string.Join('_', fieldNameCSharpParts);
var nestedStructName = $"{structNameCSharp}_{string.Join('_', fieldNameCSharpParts)}";
var codeNestedStruct = GenerateCode(context, nestedStructName, nestedStruct);
codeNestedStructs.Add(codeNestedStruct);

Expand Down

0 comments on commit 8b3e4de

Please sign in to comment.