feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -155,6 +155,32 @@ namespace Godot.SourceGenerators
|
|||
};
|
||||
}
|
||||
|
||||
public static string GetAccessibilityKeyword(this INamedTypeSymbol namedTypeSymbol)
|
||||
{
|
||||
if (namedTypeSymbol.DeclaredAccessibility == Accessibility.NotApplicable)
|
||||
{
|
||||
// Accessibility not specified. Get the default accessibility.
|
||||
return namedTypeSymbol.ContainingSymbol switch
|
||||
{
|
||||
null or INamespaceSymbol => "internal",
|
||||
ITypeSymbol { TypeKind: TypeKind.Class or TypeKind.Struct } => "private",
|
||||
ITypeSymbol { TypeKind: TypeKind.Interface } => "public",
|
||||
_ => "",
|
||||
};
|
||||
}
|
||||
|
||||
return namedTypeSymbol.DeclaredAccessibility switch
|
||||
{
|
||||
Accessibility.Private => "private",
|
||||
Accessibility.Protected => "protected",
|
||||
Accessibility.Internal => "internal",
|
||||
Accessibility.ProtectedAndInternal => "private",
|
||||
Accessibility.ProtectedOrInternal => "private",
|
||||
Accessibility.Public => "public",
|
||||
_ => "",
|
||||
};
|
||||
}
|
||||
|
||||
public static string NameWithTypeParameters(this INamedTypeSymbol symbol)
|
||||
{
|
||||
return symbol.IsGenericType ?
|
||||
|
|
@ -261,6 +287,12 @@ namespace Godot.SourceGenerators
|
|||
public static bool IsGodotGlobalClassAttribute(this INamedTypeSymbol symbol)
|
||||
=> symbol.FullQualifiedNameOmitGlobal() == GodotClasses.GlobalClassAttr;
|
||||
|
||||
public static bool IsGodotExportToolButtonAttribute(this INamedTypeSymbol symbol)
|
||||
=> symbol.FullQualifiedNameOmitGlobal() == GodotClasses.ExportToolButtonAttr;
|
||||
|
||||
public static bool IsGodotToolAttribute(this INamedTypeSymbol symbol)
|
||||
=> symbol.FullQualifiedNameOmitGlobal() == GodotClasses.ToolAttr;
|
||||
|
||||
public static bool IsSystemFlagsAttribute(this INamedTypeSymbol symbol)
|
||||
=> symbol.FullQualifiedNameOmitGlobal() == GodotClasses.SystemFlagsAttr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue