Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement regress #774

Merged
merged 13 commits into from
Oct 6, 2020
Merged

Implement regress #774

merged 13 commits into from
Oct 6, 2020

Conversation

neeldug
Copy link
Contributor

@neeldug neeldug commented Oct 3, 2020

This Pull Request fixes/closes #478.

It changes the following:

  • Implements regress crate in place of the regex crate

neeldug and others added 12 commits September 7, 2020 00:13
- Initial switch to `regress` crate, refactors all find methods
- TODO: implement captures using `regress` API
- 5 current errors for captures and boa/src/builtins/regexp/mod.rs:297:33
- TODO: Fix methods using capture groups
- Hopefully everything still works with the refactor other than capture
groups
Test: Improve string::tests::replace_with_function and fix minor typo
Can be improved once ridiculousfish/regress#7 is closed
Match::groups simplifies some code.
- Initial switch to `regress` crate, refactors all find methods
- TODO: implement captures using `regress` API
- 5 current errors for captures and boa/src/builtins/regexp/mod.rs:297:33
- TODO: Fix methods using capture groups
- Hopefully everything still works with the refactor other than capture
groups
Test: Improve string::tests::replace_with_function and fix minor typo
Can be improved once ridiculousfish/regress#7 is closed
Match::groups simplifies some code.
@codecov
Copy link

codecov bot commented Oct 3, 2020

Codecov Report

Merging #774 into master will decrease coverage by 0.03%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #774      +/-   ##
==========================================
- Coverage   59.13%   59.10%   -0.04%     
==========================================
  Files         155      155              
  Lines        9842     9837       -5     
==========================================
- Hits         5820     5814       -6     
- Misses       4022     4023       +1     
Impacted Files Coverage Δ
boa/src/builtins/string/mod.rs 54.13% <72.22%> (-0.37%) ⬇️
boa/src/builtins/regexp/mod.rs 70.94% <73.80%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff358d1...c740274. Read the comment docs.

@HalidOdat HalidOdat added builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request labels Oct 5, 2020
@HalidOdat HalidOdat added this to the v0.11.0 milestone Oct 5, 2020
@Razican
Copy link
Member

Razican commented Oct 5, 2020

It seems that this reduces our conformance for something like 19.01% to 18.99%. some of the issues I find are that things like this one fail:
https://github.com/tc39/test262/blob/main/test/language/literals/regexp/S7.8.5_A2.4_T1.js

It seems that regress is not 100% spec compliant. We should check issues like this one and report them upstream. I will also add some comments, an invalid regex should never panic.

@Razican Razican merged commit 327d71b into boa-dev:master Oct 6, 2020
@neeldug neeldug deleted the regress branch October 6, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use ECMAScript syntax for regular expressions
5 participants