mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
LibJS/Temporal: Unroll the loop in to_temporal_time_record
This is an editorial change in the Temporal spec. See: tc39/proposal-temporal@8e80575
This commit is contained in:
parent
00da2e86e6
commit
b45225dbac
2 changed files with 83 additions and 38 deletions
|
@ -72,19 +72,6 @@ struct TemporalTimeLikeRecordField {
|
|||
PropertyKey property_name;
|
||||
};
|
||||
|
||||
template<typename StructT, typename ValueT>
|
||||
auto temporal_time_like_record_fields = [](VM& vm) {
|
||||
using FieldT = TemporalTimeLikeRecordField<StructT, ValueT>;
|
||||
return AK::Array {
|
||||
FieldT { &StructT::hour, vm.names.hour },
|
||||
FieldT { &StructT::minute, vm.names.minute },
|
||||
FieldT { &StructT::second, vm.names.second },
|
||||
FieldT { &StructT::millisecond, vm.names.millisecond },
|
||||
FieldT { &StructT::microsecond, vm.names.microsecond },
|
||||
FieldT { &StructT::nanosecond, vm.names.nanosecond },
|
||||
};
|
||||
};
|
||||
|
||||
enum class ToTemporalTimeRecordCompleteness {
|
||||
Partial,
|
||||
Complete,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue