mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibJS: Hook up the 'v' (unicodeSets) RegExp flag
This commit is contained in:
parent
598dc74a76
commit
f4b26b0cea
8 changed files with 80 additions and 30 deletions
|
@ -1522,7 +1522,14 @@ NonnullRefPtr<RegExpLiteral> Parser::parse_regexp_literal()
|
|||
parsed_flags = parsed_flags_or_error.release_value();
|
||||
}
|
||||
|
||||
auto parsed_pattern = parse_regex_pattern(pattern, parsed_flags.has_flag_set(ECMAScriptFlags::Unicode));
|
||||
String parsed_pattern;
|
||||
auto parsed_pattern_result = parse_regex_pattern(pattern, parsed_flags.has_flag_set(ECMAScriptFlags::Unicode), parsed_flags.has_flag_set(ECMAScriptFlags::UnicodeSets));
|
||||
if (parsed_pattern_result.is_error()) {
|
||||
syntax_error(parsed_pattern_result.release_error().error, rule_start.position());
|
||||
parsed_pattern = String::empty();
|
||||
} else {
|
||||
parsed_pattern = parsed_pattern_result.release_value();
|
||||
}
|
||||
auto parsed_regex = Regex<ECMA262>::parse_pattern(parsed_pattern, parsed_flags);
|
||||
|
||||
if (parsed_regex.error != regex::Error::NoError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue