mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibJS: Implement the RegExpAlloc AO
This commit is contained in:
parent
db31c22491
commit
1da66b5879
Notes:
sideshowbarker
2024-07-17 05:41:53 +09:00
Author: https://github.com/linusg
Commit: 1da66b5879
Pull-request: https://github.com/SerenityOS/serenity/pull/15638
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/davidot ✅
4 changed files with 28 additions and 10 deletions
|
@ -14,7 +14,8 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
ThrowCompletionOr<RegExpObject*> regexp_create(VM&, Value pattern, Value flags);
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_create(VM&, Value pattern, Value flags);
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_alloc(VM&, FunctionObject& new_target);
|
||||
|
||||
Result<regex::RegexOptions<ECMAScriptFlags>, String> regex_flags_from_string(StringView flags);
|
||||
struct ParseRegexPatternError {
|
||||
|
@ -39,7 +40,7 @@ public:
|
|||
static RegExpObject* create(Realm&);
|
||||
static RegExpObject* create(Realm&, Regex<ECMA262> regex, String pattern, String flags);
|
||||
|
||||
ThrowCompletionOr<RegExpObject*> regexp_initialize(VM&, Value pattern, Value flags);
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_initialize(VM&, Value pattern, Value flags);
|
||||
String escape_regexp_pattern() const;
|
||||
|
||||
virtual void initialize(Realm&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue