mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibRegex: In non-Unicode mode, parse \u{4} as a repetition pattern
This commit is contained in:
parent
e85c62e3a0
commit
a9716ad44e
2 changed files with 8 additions and 4 deletions
|
@ -1489,13 +1489,15 @@ bool ECMA262Parser::parse_atom_escape(ByteCode& stack, size_t& match_length_mini
|
|||
|
||||
if (try_skip("u")) {
|
||||
if (match(TokenType::LeftCurly)) {
|
||||
consume();
|
||||
|
||||
if (!unicode) {
|
||||
// FIXME: In non-Unicode mode, this should be parsed as a repetition symbol (repeating the 'u').
|
||||
TODO();
|
||||
// In non-Unicode mode, this should be parsed as a repetition symbol (repeating the 'u').
|
||||
match_length_minimum += 1;
|
||||
stack.insert_bytecode_compare_values({ { CharacterCompareType::Char, (ByteCodeValueType)'u' } });
|
||||
return true;
|
||||
}
|
||||
|
||||
consume();
|
||||
|
||||
auto code_point = read_digits(ReadDigitsInitialZeroState::Allow, true, 6);
|
||||
if (code_point.has_value() && is_unicode(*code_point) && match(TokenType::RightCurly)) {
|
||||
consume();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue