mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00
LibRegex: Implement section B.1.4. of the ECMA262 spec
This allows the parser to deal with crazy patterns like the one in #5517.
This commit is contained in:
parent
ce5fe2a6e8
commit
f05e518cbc
7 changed files with 382 additions and 91 deletions
|
@ -136,7 +136,9 @@ public:
|
|||
u32 operator[](size_t index) const
|
||||
{
|
||||
if (is_u8_view()) {
|
||||
return u8view()[index];
|
||||
i8 ch = u8view()[index];
|
||||
u8 value = *reinterpret_cast<u8*>(&ch);
|
||||
return static_cast<u32>(value);
|
||||
}
|
||||
return u32view().code_points()[index];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue