...
This commit is contained in:
@@ -99,7 +99,7 @@ public record Manifest(Dictionary<string, Manifest.Module> Modules)
|
||||
return typeInfo switch
|
||||
{
|
||||
Compiler.Module.TypeInfoStruct s => new Module.TypeInfoStruct(s.Packed, s.Fields.Select(x => new Module.TypeInfoStruct.Field(x.Name, x.Type)).ToList()),
|
||||
Compiler.Module.TypeInfoEnum e => new Module.TypeInfoEnum(e.Variants.Select(v => new Module.TypeInfoEnum.Variant(v.Name, v.Fields.Select(x => new Module.TypeInfoEnum.Variant.Field(x.Name, x.Type)).ToList())).ToList()),
|
||||
Compiler.Module.TypeInfoEnum e => new Module.TypeInfoEnum(e.Variants.Select(v => new Module.TypeInfoEnum.Variant(v.Name, v.Type)).ToList()),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(typeInfo))
|
||||
};
|
||||
}
|
||||
@@ -121,10 +121,7 @@ public record Manifest(Dictionary<string, Manifest.Module> Modules)
|
||||
|
||||
public record TypeInfoEnum(IReadOnlyList<TypeInfoEnum.Variant> Variants) : TypeInfo
|
||||
{
|
||||
public record Variant(string Name, List<Variant.Field> Fields)
|
||||
{
|
||||
public record Field(string Name, NubType Type);
|
||||
}
|
||||
public record Variant(string Name, NubType Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user