mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Make escape_regexp_pattern() a RegExpObject member function
Similarly to regexp_initialize() this can be a member function instead of taking a RegExpObject argument. Having it available outside RegExpPrototype is also useful for other things that need RegExp.prototype.source behavior - e.g. the REPL for pretty-printing.
This commit is contained in:
parent
83bd675477
commit
78fd8c1ca2
3 changed files with 12 additions and 11 deletions
|
@ -34,6 +34,7 @@ public:
|
|||
RegExpObject(Regex<ECMA262> regex, String pattern, String flags, Object& prototype);
|
||||
|
||||
RegExpObject* regexp_initialize(GlobalObject&, Value pattern, Value flags);
|
||||
String escape_regexp_pattern() const;
|
||||
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~RegExpObject() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue