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

Allow folding if statement without elif or else #300

Merged
merged 1 commit into from Apr 13, 2019

Conversation

Projects
None yet
1 participant
@Ben3eeE
Copy link
Member

commented Apr 11, 2019

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

The changes introduced in #292 made it impossible to fold an if_statement without an elif_clause and/or else_clause. This PR fixes this by adding back if_statement to the fold rules and rearranges the rules so the rule that ends with elif_clause and else_clause types take precedence.

Before:
image

After:
image

Alternate Designs

No

Benefits

Can fold lonely if statements again

Possible Drawbacks

No

Applicable Issues

Folding part of #299

/cc: @daviwil FYI

@Ben3eeE Ben3eeE merged commit 5b25304 into master Apr 13, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Ben3eeE Ben3eeE deleted the b3-fold-if branch Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.