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] - Correctly parse consecutive semicolons #2533

Closed
wants to merge 1 commit into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Jan 15, 2023

This Pull Request changes the following:

  • Do not skip consecutive semicolons while parsing a StatementList.
  • Expect semicolon in LexicalDeclaration and add an special case for for loop parsing.
  • Adjust StatementList compilation to skip empty statements.
  • Adjust/add tests to make sure consecutive semicolons are correctly parsed.

@raskad raskad added bug Something isn't working parser Issues surrounding the parser labels Jan 15, 2023
@raskad raskad added this to the v0.17.0 milestone Jan 15, 2023
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 94,205 94,205 0
Passed 70,616 70,616 0
Ignored 18,622 18,622 0
Failed 4,967 4,967 0
Panics 0 0 0
Conformance 74.96% 74.96% 0.00%

@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Merging #2533 (b12d242) into main (f52d1d3) will decrease coverage by 0.03%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #2533      +/-   ##
==========================================
- Coverage   50.16%   50.13%   -0.03%     
==========================================
  Files         377      377              
  Lines       37469    37477       +8     
==========================================
- Hits        18795    18789       -6     
- Misses      18674    18688      +14     
Impacted Files Coverage Δ
boa_parser/src/parser/statement/mod.rs 65.96% <ø> (-0.09%) ⬇️
boa_engine/src/bytecompiler/mod.rs 58.10% <50.00%> (+0.01%) ⬆️
...parser/src/parser/statement/declaration/lexical.rs 61.06% <60.00%> (+0.43%) ⬆️
boa_engine/src/vm/code_block.rs 32.22% <0.00%> (-1.25%) ⬇️
boa_engine/src/vm/mod.rs 48.71% <0.00%> (-1.03%) ⬇️
boa_engine/src/builtins/iterable/mod.rs 74.00% <0.00%> (-0.67%) ⬇️
boa_engine/src/object/mod.rs 45.48% <0.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

Nice fix!

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.

Looks good to me. 😄

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jan 17, 2023
This Pull Request changes the following:

- Do not skip consecutive semicolons while parsing a `StatementList`.
- Expect semicolon in `LexicalDeclaration` and add an special case for `for` loop parsing.
- Adjust `StatementList` compilation to skip empty statements.
- Adjust/add tests to make sure consecutive semicolons  are correctly parsed.
@bors
Copy link

bors bot commented Jan 17, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Correctly parse consecutive semicolons [Merged by Bors] - Correctly parse consecutive semicolons Jan 17, 2023
@bors bors bot closed this Jan 17, 2023
@bors bors bot deleted the fix-semicolon-parsing branch January 17, 2023 16:37
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.

None yet

3 participants