summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-14 18:49:16 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-14 18:49:16 +0200
commitbb6879e7cc17677876bda055ee951e46670e362b (patch)
tree12ac893c8d9e920758bfae33a56f5fac2ffaa364 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
parent4adc3e1e5df46653c50ca7b485af2c3532e32e1f (diff)
parent8e56c807cc604a3042be4575e2533d9676c36f8e (diff)
downloadredot-engine-bb6879e7cc17677876bda055ee951e46670e362b.tar.gz
Merge pull request #79007 from 398utubzyt/dotnet/globalclass-analyzer
C#: Add a Roslyn analyzer for global classes
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
index b2a3c046e5..b6ea4b8e88 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
@@ -81,7 +81,7 @@ namespace Godot.SourceGenerators
return godotClassName ?? nativeType.Name;
}
- private static bool IsGodotScriptClass(
+ private static bool TryGetGodotScriptClass(
this ClassDeclarationSyntax cds, Compilation compilation,
out INamedTypeSymbol? symbol
)
@@ -108,7 +108,7 @@ namespace Godot.SourceGenerators
{
foreach (var cds in source)
{
- if (cds.IsGodotScriptClass(compilation, out var symbol))
+ if (cds.TryGetGodotScriptClass(compilation, out var symbol))
yield return (cds, symbol!);
}
}