This Pull Request fixes some additional Annex B tests.
It changes the following:
- Fixes bugs related to parsing HTML closing comments (`-->`).
- Implements `RegExp::compile` behind the `annex-b` feature.
- Ignores the `legacy-regexp` feature flag, since it's still stage 3.
// 9. Let parseResult be ParsePattern(patternText, u).
// 11. Else,
// 10. If parseResult is a non-empty List of SyntaxError objects, throw a SyntaxError exception.
// a. Let patternText be the result of interpreting each of P's 16-bit elements as a Unicode BMP code point. UTF-16 decoding is not applied to the elements.
// 11. Assert: parseResult is a Pattern Parse Node.
// 12. Let parseResult be ParsePattern(patternText, u).
// 12. Set obj.[[OriginalSource]] to P.
// 13. If parseResult is a non-empty List of SyntaxError objects, throw a SyntaxError exception.
// 13. Set obj.[[OriginalFlags]] to F.
// 14. Assert: parseResult is a Pattern Parse Node.
// 14. NOTE: The definitions of DotAll, IgnoreCase, Multiline, and Unicode in 22.2.2.1 refer to this value of obj.[[OriginalFlags]].
// 15. Set obj.[[OriginalSource]] to P.
// 15. Set obj.[[RegExpMatcher]] to CompilePattern of parseResult.
// 16. Set obj.[[OriginalFlags]] to F.
// TODO: add support for utf16 regex to remove this conversions.
// 17. Let capturingGroupsCount be CountLeftCapturingParensWithin(parseResult).
letps=p.to_std_string_escaped();
// 18. Let rer be the RegExp Record { [[IgnoreCase]]: i, [[Multiline]]: m, [[DotAll]]: s, [[Unicode]]: u, [[CapturingGroupsCount]]: capturingGroupsCount }.