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] - Do not auto-insert semicolon in VariableDeclarationList #2266

Closed
wants to merge 2 commits into from

Conversation

tunz
Copy link
Contributor

@tunz tunz commented Sep 5, 2022

There can be a line terminator in the middle of variable declaration statement. For example,

var a
, b;

In this case, we should not insert semicolon automatically.

This fixes:

  • test262/test/language/asi/S7.9_A7_T8.js
  • test262/test/language/asi/S7.9_A7_T9.js

@Razican Razican added bug Something isn't working parser Issues surrounding the parser labels Sep 5, 2022
@Razican Razican added this to the v0.16.0 milestone Sep 5, 2022
@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Merging #2266 (a6b5fc3) into main (b0025fc) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #2266      +/-   ##
==========================================
- Coverage   41.30%   41.30%   -0.01%     
==========================================
  Files         234      234              
  Lines       22018    22015       -3     
==========================================
- Hits         9095     9093       -2     
+ Misses      12923    12922       -1     
Impacted Files Coverage Δ
...engine/src/syntax/parser/statement/variable/mod.rs 44.77% <50.00%> (-0.94%) ⬇️

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

@Razican
Copy link
Member

Razican commented Sep 5, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 91,733 91,733 0
Passed 64,886 64,890 +4
Ignored 16,580 16,580 0
Failed 10,267 10,263 -4
Panics 0 0 0
Conformance 70.73% 70.74% +0.00%
Fixed tests (4):
test/language/asi/S7.9_A7_T9.js [strict mode] (previously Failed)
test/language/asi/S7.9_A7_T9.js (previously Failed)
test/language/asi/S7.9_A7_T8.js [strict mode] (previously Failed)
test/language/asi/S7.9_A7_T8.js (previously Failed)

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.

Good catch! Looks good :) It only needs a cargo fmt run, but then it can be merged, thanks!!

@raskad
Copy link
Member

raskad commented Sep 5, 2022

bors r+

@bors
Copy link

bors bot commented Sep 5, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@raskad
Copy link
Member

raskad commented Sep 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Sep 5, 2022
There can be a line terminator in the middle of variable declaration statement. For example,
```js
var a
, b;
```

In this case, we should not insert semicolon automatically.

This fixes:
- test262/test/language/asi/S7.9_A7_T8.js
- test262/test/language/asi/S7.9_A7_T9.js
@bors
Copy link

bors bot commented Sep 5, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Do not auto-insert semicolon in VariableDeclarationList [Merged by Bors] - Do not auto-insert semicolon in VariableDeclarationList Sep 5, 2022
@bors bors bot closed this Sep 5, 2022
@tunz tunz deleted the tunz/declaration-list-comma branch September 12, 2022 02:35
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