1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

LibRegex: Support property escapes of the Unicode script property

Note that unlike binary properties and general categories, scripts must
be specified in the non-binary (Script=Value) form.
This commit is contained in:
Timothy Flynn 2021-08-04 06:35:48 -04:00 committed by Linus Groh
parent f5c1bbc00b
commit 06088df729
5 changed files with 44 additions and 4 deletions

View file

@ -214,7 +214,7 @@ private:
Optional<unsigned> read_digits(ReadDigitsInitialZeroState initial_zero = ReadDigitsInitialZeroState::Allow, bool hex = false, int max_count = -1);
StringView read_capture_group_specifier(bool take_starting_angle_bracket = false);
using PropertyEscape = Variant<Unicode::Property, Unicode::GeneralCategory>;
using PropertyEscape = Variant<Unicode::Property, Unicode::GeneralCategory, Unicode::Script>;
Optional<PropertyEscape> read_unicode_property_escape();
bool parse_pattern(ByteCode&, size_t&, bool unicode, bool named);