summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/AbstractOperations.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-07-05 16:16:48 -0400
committerLinus Groh <mail@linusgroh.de>2021-07-05 23:26:41 +0100
commite0c9f58b0c5e7093e652b81f38e20aae9509ab3d (patch)
treec82c82fb29b42875d7db2c06c73cd4faa3ad882f /Userland/Libraries/LibJS/Runtime/AbstractOperations.h
parent4985d3ef42d3a280f2d525612da9a715bedf3804 (diff)
downloadserenity-e0c9f58b0c5e7093e652b81f38e20aae9509ab3d.zip
LibJS: Implement and use the GetSubstitution abstract operation
Used by String.prototype.replace, String.prototype.replaceAll, and RegExp.prototype [ @@replace ].
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/AbstractOperations.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/AbstractOperations.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h
index 3c7ecdbb68..f70f51654b 100644
--- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h
+++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h
@@ -30,6 +30,7 @@ Object* get_prototype_from_constructor(GlobalObject&, FunctionObject const& cons
Object* create_unmapped_arguments_object(GlobalObject&, Vector<Value> const& arguments);
Object* create_mapped_arguments_object(GlobalObject&, FunctionObject&, Vector<FunctionNode::Parameter> const&, Vector<Value> const& arguments, Environment&);
Value canonical_numeric_index_string(GlobalObject&, PropertyName const&);
+String get_substitution(GlobalObject&, String const& matched, String const& str, size_t position, Vector<Value> const& captures, Value named_captures, Value replacement);
enum class CallerMode {
Strict,