1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibUnicode: Generate available values for the keywords co, kf, kn, hc

This also ensures we only include values we actually support in the
generated list of available values.
This commit is contained in:
Timothy Flynn 2022-07-14 09:37:36 -04:00 committed by Andreas Kling
parent a660040806
commit c2e5b20eb6
5 changed files with 53 additions and 7 deletions

View file

@ -28,8 +28,10 @@ enum class HourCycle : u8;
enum class HourCycleRegion : u16;
enum class Key : u8;
enum class KeywordCalendar : u8;
enum class KeywordCollation : u8;
enum class KeywordColCaseFirst : u8;
enum class KeywordColNumeric : u8;
enum class KeywordHours : u8;
enum class KeywordNumbers : u8;
enum class Language : u16;
enum class ListPatternStyle : u8;

View file

@ -767,6 +767,10 @@ StringView style_to_string(Style style)
}
Span<StringView const> __attribute__((weak)) get_available_calendars() { return {}; }
Span<StringView const> __attribute__((weak)) get_available_collation_case_orderings() { return {}; }
Span<StringView const> __attribute__((weak)) get_available_collation_numeric_orderings() { return {}; }
Span<StringView const> __attribute__((weak)) get_available_collation_types() { return {}; }
Span<StringView const> __attribute__((weak)) get_available_hour_cycles() { return {}; }
Span<StringView const> __attribute__((weak)) get_available_number_systems() { return {}; }
Optional<Locale> __attribute__((weak)) locale_from_string(StringView) { return {}; }
Optional<Language> __attribute__((weak)) language_from_string(StringView) { return {}; }
@ -777,6 +781,8 @@ Optional<DateField> __attribute__((weak)) date_field_from_string(StringView) { r
Optional<ListPatternType> __attribute__((weak)) list_pattern_type_from_string(StringView) { return {}; }
Optional<Key> __attribute__((weak)) key_from_string(StringView) { return {}; }
Optional<KeywordCalendar> __attribute__((weak)) keyword_ca_from_string(StringView) { return {}; }
Optional<KeywordCollation> __attribute__((weak)) keyword_co_from_string(StringView) { return {}; }
Optional<KeywordHours> __attribute__((weak)) keyword_hc_from_string(StringView) { return {}; }
Optional<KeywordColCaseFirst> __attribute__((weak)) keyword_kf_from_string(StringView) { return {}; }
Optional<KeywordColNumeric> __attribute__((weak)) keyword_kn_from_string(StringView) { return {}; }
Optional<KeywordNumbers> __attribute__((weak)) keyword_nu_from_string(StringView) { return {}; }

View file

@ -146,6 +146,10 @@ String const& default_locale();
bool is_locale_available(StringView locale);
Span<StringView const> get_available_calendars();
Span<StringView const> get_available_collation_case_orderings();
Span<StringView const> get_available_collation_numeric_orderings();
Span<StringView const> get_available_collation_types();
Span<StringView const> get_available_hour_cycles();
Span<StringView const> get_available_number_systems();
Style style_from_string(StringView style);
@ -161,6 +165,8 @@ Optional<ListPatternType> list_pattern_type_from_string(StringView list_pattern_
Optional<Key> key_from_string(StringView key);
Optional<KeywordCalendar> keyword_ca_from_string(StringView ca);
Optional<KeywordCollation> keyword_co_from_string(StringView co);
Optional<KeywordHours> keyword_hc_from_string(StringView hc);
Optional<KeywordColCaseFirst> keyword_kf_from_string(StringView kf);
Optional<KeywordColNumeric> keyword_kn_from_string(StringView kn);
Optional<KeywordNumbers> keyword_nu_from_string(StringView nu);