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

[Merged by Bors] - Bugfix/new.target is not understood by the parser as an expression #2793 #2878

Conversation

projectnoa
Copy link
Contributor

This Pull Request fixes/closes #2793.

It changes the following:

  • Added a condition to the boa_parser/src/parser/expression/left_hand_side/member.rs parse function match operation for the new token that allows for the operation to continue evaluating more tokens when the TARGET keyword follows it.
  • Added a test to validate the fix. (Could not figure out the structure of the test suite so it's commented for now). All other tests pass.

Please let me know if there's anything else I can do to improve the fix.

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #2878 (a50565e) into main (5485c1e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2878      +/-   ##
==========================================
+ Coverage   51.22%   51.23%   +0.01%     
==========================================
  Files         427      427              
  Lines       42516    42518       +2     
==========================================
+ Hits        21779    21786       +7     
+ Misses      20737    20732       -5     
Impacted Files Coverage Δ
...ser/src/parser/expression/left_hand_side/member.rs 51.61% <100.00%> (+3.25%) ⬆️

... and 1 file with indirect coverage changes

@jedel1043 jedel1043 added bug Something isn't working parser Issues surrounding the parser labels Apr 28, 2023
@jedel1043 jedel1043 added this to the v0.17.0 milestone Apr 28, 2023
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the contribution!

Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

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

This looks good to me! 😄 Thanks for the contribution!

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Apr 28, 2023
 (#2878)

<!---
Thank you for contributing to Boa! Please fill out the template below, and remove or add any
information as you feel necessary.
--->

This Pull Request fixes/closes #2793.

It changes the following:

- Added a condition to the boa_parser/src/parser/expression/left_hand_side/member.rs parse function match operation for the new token that allows for the operation to continue evaluating more tokens when the TARGET keyword follows it.
- Added a test to validate the fix. (Could not figure out the structure of the test suite so it's commented for now). All other tests pass.

Please let me know if there's anything else I can do to improve the fix.


Co-authored-by: jedel1043 <jedel0124@gmail.com>
@bors
Copy link

bors bot commented Apr 28, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Bugfix/new.target is not understood by the parser as an expression #2793 [Merged by Bors] - Bugfix/new.target is not understood by the parser as an expression #2793 Apr 28, 2023
@bors bors bot closed this Apr 28, 2023
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.

new.target is not understood by the parser as an expression
3 participants