LibJS+js: Rename RegExp.{content => pattern}

The spec talks about it as 'pattern', so let's use that instead.
This commit is contained in:
AnotherTest 2020-11-27 17:14:50 +03:30 committed by Andreas Kling
commit 3200ff5f4f
Notes: sideshowbarker 2024-07-19 01:14:44 +09:00
5 changed files with 12 additions and 12 deletions

View file

@ -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);
}
}