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

Wrap some generated do expressions in parens #5339

Merged
merged 1 commit into from Feb 22, 2017
Merged

Conversation

zjmiller
Copy link
Contributor

Q A
Patch: Bug Fix? yes
Major: Breaking Change? no
Minor: New Feature? no
Deprecations? no
Spec Compliancy? no
Tests Added/Pass? yes
Fixed Tickets none
License MIT
Doc PR no
Dependency Changes no

A do expression at the beginning of a statement needs to be wrapped in parentheses. Otherwise the parser will think it is a do...while statement. I modified babel-generator to add these parentheses.

@mention-bot
Copy link

@zjmiller, thanks for your PR! By analyzing the history of the files in this pull request, we identified @existentialism, @hzoo and @loganfsmyth to be potential reviewers.

@oleksandr-kuzmenko
Copy link
Contributor

oleksandr-kuzmenko commented Feb 18, 2017

=)
https://github.com/babel/babel/pull/5338/files
it looks like we have added new files with the same name

@zjmiller
Copy link
Contributor Author

Ah cool. I'll take out the duplicate files from my PR and just leave the parentheses-related stuff.

@zjmiller zjmiller changed the title Wrap some generated do expressions in parens and expand test coverage Wrap some generated do expressions in parens Feb 18, 2017
@codecov-io
Copy link

codecov-io commented Feb 18, 2017

Codecov Report

Merging #5339 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #5339      +/-   ##
==========================================
+ Coverage   89.44%   89.48%   +0.04%     
==========================================
  Files         204      204              
  Lines        9949     9951       +2     
  Branches     2689     2689              
==========================================
+ Hits         8899     8905       +6     
+ Misses       1050     1046       -4
Impacted Files Coverage Δ
packages/babel-generator/src/node/parentheses.js 92.5% <100%> (+0.12%)
...ages/babel-generator/src/generators/expressions.js 96.15% <ø> (+3.07%)

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 07dd2b1...dfd266e. Read the comment docs.

@hzoo hzoo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Feb 22, 2017
@hzoo hzoo merged commit 6614a63 into babel:master Feb 22, 2017
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants