initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System.Collections.Immutable;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace Godot.SourceGenerators
|
||||
{
|
||||
public readonly struct GodotMethodData
|
||||
{
|
||||
public GodotMethodData(IMethodSymbol method, ImmutableArray<MarshalType> paramTypes,
|
||||
ImmutableArray<ITypeSymbol> paramTypeSymbols, (MarshalType MarshalType, ITypeSymbol TypeSymbol)? retType)
|
||||
{
|
||||
Method = method;
|
||||
ParamTypes = paramTypes;
|
||||
ParamTypeSymbols = paramTypeSymbols;
|
||||
RetType = retType;
|
||||
}
|
||||
|
||||
public IMethodSymbol Method { get; }
|
||||
public ImmutableArray<MarshalType> ParamTypes { get; }
|
||||
public ImmutableArray<ITypeSymbol> ParamTypeSymbols { get; }
|
||||
public (MarshalType MarshalType, ITypeSymbol TypeSymbol)? RetType { get; }
|
||||
}
|
||||
|
||||
public readonly struct GodotSignalDelegateData
|
||||
{
|
||||
public GodotSignalDelegateData(string name, INamedTypeSymbol delegateSymbol, GodotMethodData invokeMethodData)
|
||||
{
|
||||
Name = name;
|
||||
DelegateSymbol = delegateSymbol;
|
||||
InvokeMethodData = invokeMethodData;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
public INamedTypeSymbol DelegateSymbol { get; }
|
||||
public GodotMethodData InvokeMethodData { get; }
|
||||
}
|
||||
|
||||
public readonly struct GodotPropertyData
|
||||
{
|
||||
public GodotPropertyData(IPropertySymbol propertySymbol, MarshalType type)
|
||||
{
|
||||
PropertySymbol = propertySymbol;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public IPropertySymbol PropertySymbol { get; }
|
||||
public MarshalType Type { get; }
|
||||
}
|
||||
|
||||
public readonly struct GodotFieldData
|
||||
{
|
||||
public GodotFieldData(IFieldSymbol fieldSymbol, MarshalType type)
|
||||
{
|
||||
FieldSymbol = fieldSymbol;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public IFieldSymbol FieldSymbol { get; }
|
||||
public MarshalType Type { get; }
|
||||
}
|
||||
|
||||
public struct GodotPropertyOrFieldData
|
||||
{
|
||||
public GodotPropertyOrFieldData(ISymbol symbol, MarshalType type)
|
||||
{
|
||||
Symbol = symbol;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public GodotPropertyOrFieldData(GodotPropertyData propertyData)
|
||||
: this(propertyData.PropertySymbol, propertyData.Type)
|
||||
{
|
||||
}
|
||||
|
||||
public GodotPropertyOrFieldData(GodotFieldData fieldData)
|
||||
: this(fieldData.FieldSymbol, fieldData.Type)
|
||||
{
|
||||
}
|
||||
|
||||
public ISymbol Symbol { get; }
|
||||
public MarshalType Type { get; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user