Implements issue 3mhn3o5n5fm2l — JS Built-in: RegExp engine.
Summary #
- Regex engine (
regex.rs): From-scratch regex parser and backtracking matcher supporting character classes, quantifiers (greedy/lazy), anchors, capturing/non-capturing/named groups, alternation, backreferences, lookahead, and escape sequences - RegExp built-in: Constructor, prototype methods (
test,exec,toString), all flags (g/i/m/s/u/y),lastIndextracking, named capture groups - Compiler: RegExp literals (
/pattern/flags) now compile toRegExp(pattern, flags)calls - String integration: Added
match,matchAll,search; updatedreplace,replaceAll,splitto handle RegExp with$-substitution support
Test plan #
- 25 regex engine unit tests (parser, matcher, flags)
- 23 VM integration tests (constructor, literals, exec, test, toString, string methods, flags, quantifiers, alternation, lookahead, char classes, backreferences)
- All 412 JS tests pass, full workspace tests pass
cargo clippy --workspace -- -D warningscleancargo fmt --all --checkclean