mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
LibJS: Move Temporal AO structs/enum classes above function declarations
This is a bit closer to our usual style, and tidier.
This commit is contained in:
parent
7ae46ae218
commit
152251f5a7
1 changed files with 12 additions and 8 deletions
|
@ -12,17 +12,12 @@
|
||||||
|
|
||||||
namespace JS::Temporal {
|
namespace JS::Temporal {
|
||||||
|
|
||||||
Object* get_options_object(GlobalObject&, Value options);
|
|
||||||
enum class OptionType {
|
enum class OptionType {
|
||||||
Boolean,
|
Boolean,
|
||||||
String,
|
String,
|
||||||
Number
|
Number
|
||||||
};
|
};
|
||||||
Value get_option(GlobalObject&, Object& options, String const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback);
|
|
||||||
String to_temporal_rounding_mode(GlobalObject&, Object& normalized_options, String const& fallback);
|
|
||||||
u64 to_temporal_rounding_increment(GlobalObject&, Object& normalized_options, Optional<double> dividend, bool inclusive);
|
|
||||||
Optional<String> to_smallest_temporal_unit(GlobalObject&, Object& normalized_options, Vector<StringView> const& disallowed_units, Optional<String> fallback);
|
|
||||||
BigInt* round_number_to_increment(GlobalObject&, BigInt const&, u64 increment, String const& rounding_mode);
|
|
||||||
struct ISODateTime {
|
struct ISODateTime {
|
||||||
i32 year;
|
i32 year;
|
||||||
i32 month;
|
i32 month;
|
||||||
|
@ -35,7 +30,7 @@ struct ISODateTime {
|
||||||
i32 nanosecond;
|
i32 nanosecond;
|
||||||
Optional<String> calendar;
|
Optional<String> calendar;
|
||||||
};
|
};
|
||||||
Optional<ISODateTime> parse_iso_date_time(GlobalObject&, String const& iso_string);
|
|
||||||
struct TemporalInstant {
|
struct TemporalInstant {
|
||||||
i32 year;
|
i32 year;
|
||||||
i32 month;
|
i32 month;
|
||||||
|
@ -48,12 +43,21 @@ struct TemporalInstant {
|
||||||
i32 nanosecond;
|
i32 nanosecond;
|
||||||
Optional<String> time_zone_offset;
|
Optional<String> time_zone_offset;
|
||||||
};
|
};
|
||||||
Optional<TemporalInstant> parse_temporal_instant_string(GlobalObject&, String const& iso_string);
|
|
||||||
struct TemporalTimeZone {
|
struct TemporalTimeZone {
|
||||||
bool z;
|
bool z;
|
||||||
Optional<String> offset;
|
Optional<String> offset;
|
||||||
Optional<String> name;
|
Optional<String> name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Object* get_options_object(GlobalObject&, Value options);
|
||||||
|
Value get_option(GlobalObject&, Object& options, String const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback);
|
||||||
|
String to_temporal_rounding_mode(GlobalObject&, Object& normalized_options, String const& fallback);
|
||||||
|
u64 to_temporal_rounding_increment(GlobalObject&, Object& normalized_options, Optional<double> dividend, bool inclusive);
|
||||||
|
Optional<String> to_smallest_temporal_unit(GlobalObject&, Object& normalized_options, Vector<StringView> const& disallowed_units, Optional<String> fallback);
|
||||||
|
BigInt* round_number_to_increment(GlobalObject&, BigInt const&, u64 increment, String const& rounding_mode);
|
||||||
|
Optional<ISODateTime> parse_iso_date_time(GlobalObject&, String const& iso_string);
|
||||||
|
Optional<TemporalInstant> parse_temporal_instant_string(GlobalObject&, String const& iso_string);
|
||||||
Optional<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject&, String const& iso_string);
|
Optional<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject&, String const& iso_string);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue