rusty icon indicating copy to clipboard operation
rusty copied to clipboard

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

Open mhasel opened this issue 1 year ago • 0 comments

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.

mhasel avatar May 02 '24 13:05 mhasel