mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibJS: Move ISO-related structures to their own file
Currently, AbstractOperations.h needs to include Time.h for the Time structure. Soon, Time.h will need to include AbstractOperations.h for structures defined there. To avoid a circular include, let's put the ISO types into their own file, so that AO.h does not need to include any JS type header.
This commit is contained in:
parent
46998e922a
commit
021a5f4ded
Notes:
github-actions[bot]
2024-11-23 13:47:25 +00:00
Author: https://github.com/trflynn89
Commit: 021a5f4ded
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2513
Reviewed-by: https://github.com/shannonbooth ✅
8 changed files with 79 additions and 58 deletions
|
@ -15,7 +15,7 @@
|
|||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Temporal/ISO8601.h>
|
||||
#include <LibJS/Runtime/Temporal/PlainTime.h>
|
||||
#include <LibJS/Runtime/Temporal/ISORecords.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
#include <math.h>
|
||||
|
@ -134,25 +134,6 @@ struct RelativeTo {
|
|||
GC::Ptr<JS::Object> zoned_relative_to; // [[ZonedRelativeTo]]
|
||||
};
|
||||
|
||||
// 13.31 ISO String Time Zone Parse Records, https://tc39.es/proposal-temporal/#sec-temporal-iso-string-time-zone-parse-records
|
||||
struct ParsedISOTimeZone {
|
||||
bool z_designator { false };
|
||||
Optional<String> offset_string;
|
||||
Optional<String> time_zone_annotation;
|
||||
};
|
||||
|
||||
// 13.32 ISO Date-Time Parse Records, https://tc39.es/proposal-temporal/#sec-temporal-iso-date-time-parse-records
|
||||
struct ParsedISODateTime {
|
||||
struct StartOfDay { };
|
||||
|
||||
Optional<i32> year { 0 };
|
||||
u8 month { 0 };
|
||||
u8 day { 0 };
|
||||
Variant<StartOfDay, Time> time;
|
||||
ParsedISOTimeZone time_zone;
|
||||
Optional<String> calendar;
|
||||
};
|
||||
|
||||
struct DifferenceSettings {
|
||||
Unit smallest_unit;
|
||||
Unit largest_unit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue