Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Another way to go is with term rewriting libraries like meander. I suspect you could define your parsing rules there and let the engine transform it for you. They have an html hiccup demo.
I'm aware of Meander - in fact I ended up trying to make my own Meander-clone solely for rewriting Hiccup because I didn't find the Meander DSL very intuitive for that particular purpose. Perhaps I should take a second look at what it can do.
Emitters are implementations of the emit multimethod that dispatches on the type key of the ast node (just a clojure map). They emit expressions in the target language, so JavaScript string source for cljs or forms. emit- form.