1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 17:55:06 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibUnicode
Timothy Flynn b543c3e490 Meta: Don't assume how each generator wants to generate keyed map names
The generate_mapping helper generates a series of structs like:

    Array<SomeType, 1> s_mapping_key_0 {};
    Array<SomeType, 2> s_mapping_key_1 {};
    Array<SomeType, 3> s_mapping_key_2 {};
    Array<Span<SomeType const>> s_mapping { {
        s_mapping_key_0.span(),
        s_mapping_key_1.span(),
        s_mapping_key_2.span(),
    } };

Where the names of the struct were generated by the format_mapping_name
lambda inside the helper. Rather than this lambda making assumptions on
how each generator wants to name its structs, add a parameter for the
caller to provide a naming formatter.

This is because the TimeZoneData generator will want pretty specific
identifier formatting rules.
2022-01-11 00:36:45 +01:00
..
CMakeLists.txt LibUnicode: Use LibTimeZone's list of time zone names 2022-01-08 12:45:34 +01:00
GenerateUnicodeData.cpp LibUnicode: Convert UnicodeData to link with weak symbols 2022-01-04 22:49:43 +00:00
GenerateUnicodeDateTimeFormat.cpp Meta: Don't assume how each generator wants to generate keyed map names 2022-01-11 00:36:45 +01:00
GenerateUnicodeLocale.cpp Meta: Support generating case-insensitive value-from-string methods 2022-01-11 00:36:45 +01:00
GenerateUnicodeNumberFormat.cpp Meta: Don't assume how each generator wants to generate keyed map names 2022-01-11 00:36:45 +01:00
GeneratorUtil.h Meta: Don't assume how each generator wants to generate keyed map names 2022-01-11 00:36:45 +01:00