Fixed exception logging and entity id of messages

This commit is contained in:
Simon Lübeß
2026-09-03 22:35:14 +02:00
parent abf7a01917
commit 1435dac4d6
10 changed files with 331 additions and 72 deletions
+25 -2
View File
@@ -122,7 +122,8 @@ public class ScriptGlueGenerator : IIncrementalGenerator
None,
Ref,
In,
Out
Out,
Pointer
}
private static (MappedType Type, TypeModifier Modifier) DecodeType(string beefType, Dictionary<string, MappedType> beefTypeToMappedType)
@@ -145,6 +146,15 @@ public class ScriptGlueGenerator : IIncrementalGenerator
beefType = beefType.Substring(3);
}
if (beefTypeToMappedType.TryGetValue(beefType, out var mapping))
return (mapping, modifier);
if (beefType.EndsWith("*"))
{
modifier = TypeModifier.Pointer;
beefType = beefType.Substring(0, beefType.Length - 1);
}
if (beefTypeToMappedType.TryGetValue(beefType, out MappedType? mappedType))
{
return (mappedType, modifier);
@@ -296,6 +306,14 @@ public class ScriptGlueGenerator : IIncrementalGenerator
}
parameterText.Append(parameterType.CSharpTypeName);
switch (parameterModifier)
{
case TypeModifier.Pointer:
parameterText.Append("*");
break;
}
parameterText.Append(", ");
}
@@ -345,7 +363,12 @@ public class ScriptGlueGenerator : IIncrementalGenerator
break;
}
parameterText.Append($"{parameterType.CSharpWrapperType} {param.Name}");
parameterText.Append($"{parameterType.CSharpWrapperType}");
if (parameterModifier == TypeModifier.Pointer)
parameterText.Append("*");
parameterText.Append($" {param.Name}");
switch (parameterModifier)
{