cm0002@lemmy.world to Programmer Humor@programming.dev · 18 hours agoWhat's stopping you from writing your Rust like this?lemmy.mlimagemessage-square54fedilinkarrow-up1334arrow-down16
arrow-up1328arrow-down1imageWhat's stopping you from writing your Rust like this?lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 18 hours agomessage-square54fedilink
minus-squareCanadaPlus@lemmy.sdf.orglinkfedilinkarrow-up7·7 hours agoWow, so this is possible. Formatting is so damn arbitrary. Somebody has to have tried storing just the parse tree on disk, right?
minus-squarebrisk@aussie.zonelinkfedilinkarrow-up1·28 minutes agoThe closest thing I’ve seen is Combobulate
minus-squareLightfire228linkfedilinkarrow-up2·5 hours agoIf you do that, you lose formatting and comments every time you load the source from disk
minus-squareCanadaPlus@lemmy.sdf.orglinkfedilinkarrow-up3·edit-23 hours agoLosing formatting other than what you’ve set in your deparser would be the point. Losing comments would be bad, but that seems easily fixable just by giving each comment block a symbol that points to it’s contents.
minus-squaredjehuti@programming.devlinkfedilinkarrow-up1·21 minutes agoOr by including comments in the parse tree. (& Yes, it is done various places for various languages and formats.)
Wow, so this is possible.
Formatting is so damn arbitrary. Somebody has to have tried storing just the parse tree on disk, right?
The closest thing I’ve seen is Combobulate
If you do that, you lose formatting and comments every time you load the source from disk
Losing formatting other than what you’ve set in your deparser would be the point. Losing comments would be bad, but that seems easily fixable just by giving each comment block a symbol that points to it’s contents.
Or by including comments in the parse tree. (& Yes, it is done various places for various languages and formats.)