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

Prevent creation of extra else for case statements #8

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

sharipov-ru
Copy link
Contributor

@sharipov-ru sharipov-ru commented Oct 22, 2018

PR fixes this issue: #7 by introducing if condition which checks whether else statement exists or not.

I'd also suggest to rename underscore variables _else and _whens to something like ast_else_node and ast_when_nodes, because having instructions like:

if _else

feels like a bit weird

Looking forward to hear your feedback @zeisler, I can update this PR if you approve my renaming suggestion.

@zeisler
Copy link
Owner

zeisler commented Oct 24, 2018

@sharipov-ru that looks great. I'm open for the variable name change if you want to open another pr.

@zeisler zeisler merged commit ed556ce into zeisler:master Oct 24, 2018
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

2 participants