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

Allow true, false and null in object patterns #2994

Merged
merged 2 commits into from
Jun 3, 2023
Merged

Conversation

jedel1043
Copy link
Member

This Pull Request allows using certain valid keywords inside patterns.

@jedel1043 jedel1043 added bug Something isn't working parser Issues surrounding the parser labels Jun 3, 2023
@jedel1043 jedel1043 added this to the v0.17.0 milestone Jun 3, 2023
@jedel1043 jedel1043 requested a review from a team June 3, 2023 07:56
@github-actions
Copy link

github-actions bot commented Jun 3, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,118 94,118 0
Passed 74,620 74,620 0
Ignored 17,750 17,750 0
Failed 1,748 1,748 0
Panics 0 0 0
Conformance 79.28% 79.28% 0.00%

@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #2994 (cd1ef41) into main (65bf54d) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2994      +/-   ##
==========================================
- Coverage   50.22%   50.15%   -0.07%     
==========================================
  Files         446      446              
  Lines       46019    46030      +11     
==========================================
- Hits        23114    23088      -26     
- Misses      22905    22942      +37     
Impacted Files Coverage Δ
boa_parser/src/parser/statement/mod.rs 60.53% <100.00%> (+0.17%) ⬆️

... and 15 files with indirect coverage changes

@Razican
Copy link
Member

Razican commented Jun 3, 2023

It seems that there is no test for this in Test262, so we should probably add our own, and maybe add a test to Test262.

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! +1 for the tests to test262, if not then our own :)

@jedel1043
Copy link
Member Author

It seems that there is no test for this in Test262, so we should probably add our own, and maybe add a test to Test262.

Will add both a test here and a PR on Test262, just to avoid blocking this on that PR.

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Razican Razican added this pull request to the merge queue Jun 3, 2023
Merged via the queue into main with commit ee97198 Jun 3, 2023
@jedel1043 jedel1043 deleted the bool-null-in-pattern branch June 3, 2023 21:55
Razican pushed a commit that referenced this pull request Jun 26, 2023
* Allow `true`, `false` and `null` in object patterns

* Add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants