import {PatioDataPtrValue, PatioIntValue} from ./values; // == Types == sum PatioType { variant PatioBoolType; variant PatioByteType; variant PatioDataPtrType; variant PatioFunctionPtrType; variant PatioInt32Type; variant PatioIntType; } struct PatioBoolType { singleton; } struct PatioByteType { singleton; } struct PatioDataPtrType { singleton; } struct PatioFunctionPtrType { singleton; } struct PatioInt32Type { singleton; } struct PatioIntType { singleton; } // == Data layouts == sum PatioDataLayout { variant PatioDataLayoutArray box; variant PatioDataLayoutBool; variant PatioDataLayoutByte; variant PatioDataLayoutDataPtr; variant PatioDataLayoutFunctionPtr; variant PatioDataLayoutInt; variant PatioDataLayoutInt32; variant PatioDataLayoutStruct; } struct PatioDataLayoutArray { field element: PatioDataLayout; // TODO: should be UInt32 field size: Int32; } struct PatioDataLayoutBool { singleton; } struct PatioDataLayoutByte { singleton; } struct PatioDataLayoutDataPtr { singleton; } struct PatioDataLayoutFunctionPtr { singleton; } struct PatioDataLayoutInt { singleton; } struct PatioDataLayoutInt32 { singleton; } struct PatioDataLayoutStruct { field elements: List[PatioDataLayout]; } // == Data values == sum PatioDataValue { variant PatioDataValueArray; variant PatioDataValueBool; variant PatioDataValueByte; variant PatioDataValueDataPtr; variant PatioDataValueInt; variant PatioDataValueInt32; variant PatioDataValueStruct; } struct PatioDataValueArray { field elementLayout: PatioDataLayout; field elements: List[PatioDataValue]; } struct PatioDataValueBool { field value: Bool; } struct PatioDataValueByte { field value: Int8; } struct PatioDataValueDataPtr { field value: PatioDataPtrValue; } struct PatioDataValueInt { field value: PatioIntValue; } struct PatioDataValueInt32 { field value: PatioIntValue; } struct PatioDataValueStruct { field elements: List[PatioDataValue]; }