Amogh Talpallikar
Amogh Talpallikar

Reputation: 12184

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

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 ?

Upvotes: 2

Views: 373

Answers (1)

Timothy Pratley
Timothy Pratley

Reputation: 10662

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

Upvotes: 4

Related Questions