Skip to content

Conversation

@juntyr
Copy link
Member

@juntyr juntyr commented Nov 2, 2024

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 juntyr changed the title Rusty struct Add a braced_structs extension Nov 2, 2024
@juntyr
Copy link
Member Author

juntyr commented Nov 2, 2024

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 juntyr changed the title Add a braced_structs extension Add PrettyConfig::braced_structs Nov 3, 2024
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