zig-js issue zig-utils/zig-js#213 needs JavaScriptCore-compatible empty regular expressions.
ECMAScript treats an empty pattern as a valid zero-width regex, but Regex.compileWithFlags currently returns RegexError.EmptyPattern before the parser can build its existing empty AST node.
Acceptance criteria:
zig-js issue zig-utils/zig-js#213 needs JavaScriptCore-compatible empty regular expressions.
ECMAScript treats an empty pattern as a valid zero-width regex, but
Regex.compileWithFlagscurrently returnsRegexError.EmptyPatternbefore the parser can build its existing empty AST node.Acceptance criteria:
findandfindFromreturn a zero-width match at the requested valid position.