mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
LibJS: Hook up Regex<ECMA262> to RegExpObject and implement `test()'
This makes RegExpObject compile and store a Regex<ECMA262>, adds all flag-related properties, and implements `RegExpPrototype.test()` (complete with 'lastIndex' support) :^) It should be noted that this only implements `test()' using the builtin `exec()'.
This commit is contained in:
parent
75081b2bdd
commit
8ba273a2f3
13 changed files with 396 additions and 12 deletions
|
@ -261,6 +261,7 @@ public:
|
|||
struct MatchInput {
|
||||
RegexStringView view { nullptr };
|
||||
AllOptions regex_options {};
|
||||
size_t start_offset { 0 }; // For Stateful matches, saved and restored from Regex::start_offset.
|
||||
|
||||
size_t match_index { 0 };
|
||||
size_t line { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue