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

fix: wrap postfix statements in parens when followed by a semicolon #943

Conversation

alangpierce
Copy link
Member

Fixes #748

a if b; c is a conditional followed by a statement, but if b then a; c has
a; c as the conditional body. To avoid this, we can always wrap these types of
statements in parens if there's a semicolon after them.

Fixes decaffeinate#748

`a if b; c` is a conditional followed by a statement, but `if b then a; c` has
`a; c` as the conditional body. To avoid this, we can always wrap these types of
statements in parens if there's a semicolon after them.
@alangpierce alangpierce merged commit 4d9efa2 into decaffeinate:master Apr 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant