3 ms·
JetBrains' MPS does exactly that - it stores the code as an AST, then renders it based on your own preferences: https://www.jetbrains.com/mps/concepts/ https:/
by mintcoffee 7y ago
JetBrains' MPS does exactly that - it stores the code as an AST, then renders it based on your own preferences:
https://www.jetbrains.com/mps/concepts/ https://www.jetbrains.com/mps/concepts/
- gen220 7y agoWow this is a killer feature. If you're really zealous about how things "ought to be", now you can just write your preferences out once and be done with it. Stinks that it locks you into JetBrains, presumably: unless, is this part open-sourced?
- SomeOldThrow 7y agoSeems like the underlying format is unrelated to editing with customizable AST—in fact, that seems like it'd make things like code review pretty miserable. You'd have to upgrade all tooling to be ast-aware. That said, once upgraded, that would be far, far, far superior to text. Our tooling hit the limits of text a long time ago: consider how terrible diffs are at communicating simple operations like indentation changes, or how basic our refactoring is even in the best case scenarios.