-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add extract_assignment assist #7130
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
Conversation
dccf19d
to
3e2159a
Compare
a449402
to
22c3a62
Compare
Added support for match. Getting correct indentation is a bit of a PITA and I'm not sure if I did it correctly |
Yes indentation is an unsolved problem still iirc hence why its not so nice to do for now. Ideally we would be able to just format the produced syntax but thats yet to be done. LGTM overall, just a small nit left, if that doesn't work as I imagined feel free to ignore it. |
✌️ Jesse-Bakker can now approve this pull request. To approve and merge a pull request, simply reply with |
22c3a62
to
bfe6a8e
Compare
bors r+ |
Build succeeded! And happy new year! 🎉 |
See #4182 for indent. |
Add extract-assignment assist (#7006).
Assist is for now only implemented on if/match-statements where the assigment is the last statement in every block,
as for other cases, one would have to check whether the assignment has effects on the rest of the block and
extract a temporary variable for it in the block.