Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

fwiw, this is what we do in Dark [1]. We store (serialized) ASTs, then then we pretty print them in the editor. This converts the AST into tokens that you see on your screen, complete with configurable* indentation, line-length, etc. Code would be displayed according to your config* and the same code displayed differently to a different developer looking at the same code.

[1] https://darklang.com

* I haven't actually enabled users to configure this, but it's just some variables called 'indent' and `lineLength` in the code



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: