Really cute Clojure project that builds a full parse tree (i.e including whitespace), allows code to transform the _abstract_ syntax tree, then splices the changed sexp whilst preserving source comments! https://vimeo.com/45695419
Enables code transformations that look like macros.
Related Posts
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!
Over a sufficiently long time horizon, all code you write is legacy code.