1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibJS: Make a couple of RegExp.prototype properties accessors

This commit is contained in:
Linus Groh 2021-06-13 20:12:19 +01:00
parent 83d3175b13
commit 3ed5a0c68d

View file

@ -32,12 +32,11 @@ void RegExpPrototype::initialize(GlobalObject& global_object)
define_native_function(vm.well_known_symbol_match(), symbol_match, 1, attr);
define_native_function(vm.well_known_symbol_replace(), symbol_replace, 2, attr);
u8 readable_attr = Attribute::Configurable;
define_native_property(vm.names.flags, flags, {}, readable_attr);
define_native_property(vm.names.source, source, {}, readable_attr);
define_native_accessor(vm.names.flags, flags, {}, Attribute::Configurable);
define_native_accessor(vm.names.source, source, {}, Attribute::Configurable);
#define __JS_ENUMERATE(flagName, flag_name, flag_char, ECMAScriptFlagName) \
define_native_property(vm.names.flagName, flag_name, {}, readable_attr);
define_native_accessor(vm.names.flagName, flag_name, {}, Attribute::Configurable);
JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE
}