C#: Escape signal parameters
This commit is contained in:
parent
533c616cb8
commit
2a3d400dd8
2 changed files with 5 additions and 5 deletions
|
@ -32,9 +32,9 @@ partial class EventSignals
|
|||
add => backing_MySignal += value;
|
||||
remove => backing_MySignal -= value;
|
||||
}
|
||||
protected void EmitSignalMySignal(string str, int num)
|
||||
protected void EmitSignalMySignal(string @str, int @num)
|
||||
{
|
||||
EmitSignal(SignalName.MySignal, str, num);
|
||||
EmitSignal(SignalName.MySignal, @str, @num);
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
|
|
|
@ -295,7 +295,7 @@ namespace Godot.SourceGenerators
|
|||
for (int i = 0; i < paramCount; i++)
|
||||
{
|
||||
var paramSymbol = invokeMethodSymbol.Parameters[i];
|
||||
source.Append($"{paramSymbol.Type.FullQualifiedNameIncludeGlobal()} {paramSymbol.Name}");
|
||||
source.Append($"{paramSymbol.Type.FullQualifiedNameIncludeGlobal()} @{paramSymbol.Name}");
|
||||
if (i < paramCount - 1)
|
||||
{
|
||||
source.Append(", ");
|
||||
|
@ -310,11 +310,11 @@ namespace Godot.SourceGenerators
|
|||
if (paramSymbol.Type.TypeKind == TypeKind.Enum)
|
||||
{
|
||||
var underlyingType = ((INamedTypeSymbol)paramSymbol.Type).EnumUnderlyingType;
|
||||
source.Append($", ({underlyingType.FullQualifiedNameIncludeGlobal()}){paramSymbol.Name}");
|
||||
source.Append($", ({underlyingType.FullQualifiedNameIncludeGlobal()})@{paramSymbol.Name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
source.Append($", {paramSymbol.Name}");
|
||||
source.Append($", @{paramSymbol.Name}");
|
||||
}
|
||||
source.Append(");\n");
|
||||
source.Append(" }\n");
|
||||
|
|
Loading…
Reference in a new issue