Is there a good way to preserve comments while modifying clojure code?

328 Views Asked by At

I am reading a clojure source code file using clojure's read-string. However single line comments are naturally ignored by the reader. When I generate new source code, those comments are no there anymore.

Is there a way I can preserve these comments ?

1

There are 1 best solutions below

0
On BEST ANSWER

Rewrite-clj https://github.com/xsc/rewrite-clj seems perfect for what you are trying to do? It preserves comments.