mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 07:25:07 +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
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