mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibRegex+LibUnicode: Begin implementing Unicode property escapes
This supports some binary property matching. It does not support any properties not yet parsed by LibUnicode, nor does it support value matching (such as Script_Extensions=Latin).
This commit is contained in:
parent
f1dd770a8a
commit
d485cf29d7
Notes:
sideshowbarker
2024-07-18 07:43:31 +09:00
Author: https://github.com/trflynn89
Commit: d485cf29d7
Pull-request: https://github.com/SerenityOS/serenity/pull/9090
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg
11 changed files with 230 additions and 33 deletions
|
@ -34,6 +34,7 @@ enum class Error : u8 {
|
|||
EmptySubExpression = __Regex_EmptySubExpression, // Sub expression has empty content.
|
||||
InvalidCaptureGroup = __Regex_InvalidCaptureGroup, // Content of capture group is invalid.
|
||||
InvalidNameForCaptureGroup = __Regex_InvalidNameForCaptureGroup, // Name of capture group is invalid.
|
||||
InvalidNameForProperty = __Regex_InvalidNameForProperty, // Name of property is invalid.
|
||||
};
|
||||
|
||||
inline String get_error_string(Error error)
|
||||
|
@ -73,6 +74,8 @@ inline String get_error_string(Error error)
|
|||
return "Content of capture group is invalid.";
|
||||
case Error::InvalidNameForCaptureGroup:
|
||||
return "Name of capture group is invalid.";
|
||||
case Error::InvalidNameForProperty:
|
||||
return "Name of property is invalid.";
|
||||
}
|
||||
return "Undefined error.";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue