-
Notifications
You must be signed in to change notification settings - Fork 81
experiment: rascal formatter based on Box and layoutDiff #2346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2346 +/- ##
=======================================
Coverage 47% 47%
- Complexity 6626 6627 +1
=======================================
Files 783 783
Lines 64703 64698 -5
Branches 9688 9683 -5
=======================================
+ Hits 30724 30732 +8
+ Misses 31580 31562 -18
- Partials 2399 2404 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
In the spirit of eat your own dog food, I gave it a spin
The error is not in the original file:
I did not investigate further, but it might very well be introduced by our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Really cool to test declarative formatting on a mature languge.
I think finding a formatting for Rascal that's commonly agreed on might be controversial...
…n between two elements
…t also not the last forced newline removed
…oxes to _H, _V, etc. to avoid infinite recursions. This allows for removal of 50% of the brackets in Box expressions.
…cumentation purposes
Rascal is a pretty big language so this pushes the new
toBox
andformat
andlayoutDiff
functions to the max.toBox
rules such that the formatter produces beautiful layout, andtoBox
,format
andlayoutDiff
for later fixing.