mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 17:47:24 +02:00
* Add source generator for DataDefinition validation * Add source generator for reading * Add source generator for writing * Include prototypes and other meansdatadefinition types * Target ISerializationGenerated in data definitions * Murder * Use array, struct, enum methods * Source generate get field definitions * serv5 * Fix and pray * Fix release compile * Tayrtahn review * a * Generator bugfix --------- Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
27 lines
606 B
C#
27 lines
606 B
C#
using Microsoft.CodeAnalysis;
|
|
using Robust.Roslyn.Shared.Helpers;
|
|
|
|
namespace Robust.Serialization.Generator;
|
|
|
|
public sealed record DataField(
|
|
ISymbol Symbol,
|
|
ITypeSymbol Type,
|
|
DataFieldAttribute Attribute,
|
|
(INamedTypeSymbol Serializer, CustomSerializerType Type)? CustomSerializer
|
|
);
|
|
|
|
[Flags]
|
|
public enum CustomSerializerType
|
|
{
|
|
None = 0,
|
|
Copier = 1 << 0,
|
|
CopyCreator = 1 << 1,
|
|
MappingValidator = 1 << 2,
|
|
SequenceValidator = 1 << 3,
|
|
ValueValidator = 1 << 4,
|
|
MappingReader = 1 << 5,
|
|
SequenceReader = 1 << 6,
|
|
ValueReader = 1 << 7,
|
|
Writer = 1 << 8,
|
|
}
|