1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #79007 from 398utubzyt/dotnet/globalclass-analyzer

C#: Add a Roslyn analyzer for global classes
This commit is contained in:
Yuri Sizov
2023-07-14 18:49:16 +02:00
3 changed files with 104 additions and 2 deletions

View File

@@ -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!);
}
}