ron
ron copied to clipboard
Add `PrettyConfig::braced_structs`
This is just a quick attempt at getting something going for #550. Anyone (e.g. @HKalbasi) is free to pick up my branch and work on this further, I might not have time for more for a while.
- [ ] Add tests, especially for the newtype interaction
- [ ] Add custom error variants / messages
- [ ] Update the extension docs and grammar
- [ ] I've included my change in
CHANGELOG.md
Thinking about this some more and the challenges of this implementation draft ... I think this should not be an extension but instead a pretty printing option
- this would allow all parsers to parse both the parenthesised and the braced syntax
- it would simplify the parser because it would not need to suddenly make previously allowed cases fail
- it would not require changes to RawValue
- as a downside, it would not be possible (immediately) to only parse code that follows the new syntax