raylib building
This commit is contained in:
@@ -183,6 +183,22 @@ public class NubStructFieldType(string name, NubType type, bool hasDefaultValue)
|
||||
public bool HasDefaultValue { get; } = hasDefaultValue;
|
||||
}
|
||||
|
||||
public class NubEnumType(string module, string name, NubIntType underlyingType, Dictionary<string, ulong> members) : NubType
|
||||
{
|
||||
public string Module { get; } = module;
|
||||
public string Name { get; } = name;
|
||||
public NubIntType UnderlyingType { get; } = underlyingType;
|
||||
public Dictionary<string, ulong> Members { get; } = members;
|
||||
|
||||
public override ulong GetSize() => UnderlyingType.GetSize();
|
||||
public override ulong GetAlignment() => UnderlyingType.GetSize();
|
||||
public override bool IsAggregate() => false;
|
||||
|
||||
public override bool Equals(NubType? other) => other is NubEnumType enumType && Name == enumType.Name && Module == enumType.Module;
|
||||
public override int GetHashCode() => HashCode.Combine(typeof(NubEnumType), Module, Name);
|
||||
public override string ToString() => $"{Module}::{Name}";
|
||||
}
|
||||
|
||||
public class NubSliceType(NubType elementType) : NubType
|
||||
{
|
||||
public NubType ElementType { get; } = elementType;
|
||||
|
||||
Reference in New Issue
Block a user