1 module dpp2.sea.type; 2 3 4 import dpp.from; 5 6 7 alias Type = from!"sumtype".SumType!( 8 Void, NullPointerT, 9 Bool, 10 UnsignedChar, SignedChar, Char, Wchar, Char16, Char32, 11 Short, UnsignedShort, Int, UnsignedInt, Long, UnsignedLong, LongLong, UnsignedLongLong, Int128, UnsignedInt128, 12 Half, Float, Double, LongDouble, 13 Pointer, 14 ConstantArray, 15 UserDefinedType, 16 ); 17 18 19 struct Void {} 20 struct NullPointerT {} 21 22 struct Bool {} 23 24 struct UnsignedChar {} 25 struct SignedChar {} 26 struct Char {} 27 struct Wchar {} 28 struct Char16 {} 29 struct Char32 {} 30 31 struct Short {} 32 struct UnsignedShort {} 33 struct Int {} 34 struct UnsignedInt {} 35 struct Long {} 36 struct UnsignedLong {} 37 struct LongLong {} 38 struct UnsignedLongLong {} 39 struct Int128 {} 40 struct UnsignedInt128 {} 41 42 struct Half {} 43 struct Float {} 44 struct Double {} 45 struct LongDouble {} 46 47 48 struct Pointer { 49 // has to be a pointer in order to have a recursive type 50 Type* pointeeType; 51 } 52 53 54 struct ConstantArray { 55 // has to be a pointer in order to have a recursive type 56 Type* elementType; 57 int length; 58 } 59 60 struct UserDefinedType { 61 string spelling; 62 }