mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibJS+js: Rename RegExp.{content => pattern}
The spec talks about it as 'pattern', so let's use that instead.
This commit is contained in:
parent
3db8ced4c7
commit
3200ff5f4f
Notes:
sideshowbarker
2024-07-19 01:14:44 +09:00
Author: https://github.com/alimpfard
Commit: 3200ff5f4f
Pull-request: https://github.com/SerenityOS/serenity/pull/4103
Reviewed-by: https://github.com/linusg ✅
5 changed files with 12 additions and 12 deletions
|
@ -58,13 +58,13 @@ Value RegExpConstructor::construct(Function&)
|
|||
auto& vm = this->vm();
|
||||
if (!vm.argument_count())
|
||||
return RegExpObject::create(global_object(), "(?:)", "");
|
||||
auto contents = vm.argument(0).to_string(global_object());
|
||||
auto pattern = vm.argument(0).to_string(global_object());
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto flags = vm.argument_count() > 1 ? vm.argument(1).to_string(global_object()) : "";
|
||||
if (vm.exception())
|
||||
return {};
|
||||
return RegExpObject::create(global_object(), contents, flags);
|
||||
return RegExpObject::create(global_object(), pattern, flags);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue