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

feat: derive try_from trait impl for inner AstStatement structs, add convenience macro #1221

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mhasel
Copy link
Member

@mhasel mhasel commented May 2, 2024

Adds the derive_more crate to derive a TryFrom implementation for most of the AstStatement variants. This should allow for more concise and convenient pattern matching when trying to extract information from the innter AstStatement-structs.

I've started replacing existing code with the macro where I thought it was sensible/would improve readibility. There are most likely many instances I've missed, but that shouldn't be the focus of this PR. These instances can be changed as they are encountered.

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.

1 participant