Closed jwerle closed 4 years ago
Yes this is fairly easy to implement. All it needs is zz.pest to parse it as short hand, then in parser.rs duplicate the field name.
There are no additional checks required because abs will catch if the field name is actually not in scope.
Hi @aep,
I hope you are doing well. I am curious for your thoughts about supporting field init shorthand parameters, much like Rust [1] for ZZ.
[1]: https://doc.rust-lang.org/book/ch05-01-defining-structs.html#using-the-field-init-shorthand-when-variables-and-fields-have-the-same-name