ron icon indicating copy to clipboard operation
ron copied to clipboard

Add `PrettyConfig::braced_structs`

Open juntyr opened this issue 1 year ago • 1 comments

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

juntyr avatar Nov 02 '24 05:11 juntyr

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

juntyr avatar Nov 02 '24 09:11 juntyr