From 6cf64d0f095df68b14c72c93a58781f249eb2c96 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 15 Jul 2021 08:56:55 -0400 Subject: [PATCH] LibJS: Make the RegExpExec abstraction publically available For RegExpStringIterator, this will be needed outside of the RegExp prototype. --- Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/RegExpPrototype.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp index 937917f5fa..d0427395cb 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp @@ -292,7 +292,7 @@ static Value regexp_builtin_exec(GlobalObject& global_object, RegExpObject& rege } // 22.2.5.2.1 RegExpExec ( R, S ), https://tc39.es/ecma262/#sec-regexpexec -static Value regexp_exec(GlobalObject& global_object, Object& regexp_object, String const& string) +Value regexp_exec(GlobalObject& global_object, Object& regexp_object, String const& string) { auto& vm = global_object.vm(); diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h index 70957ffb41..abed0b05ce 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h +++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h @@ -10,6 +10,8 @@ namespace JS { +Value regexp_exec(GlobalObject& global_object, Object& regexp_object, String const& string); + class RegExpPrototype final : public Object { JS_OBJECT(RegExpPrototype, Object);