cljs / api

ClojureScript API parser
http://cljs.github.io/api/
MIT License
193 stars 23 forks source link

`^symbol` is just `^{:tag symbol}` not `^{:tag <eval of symbol>}`? #187

Closed shaunlebron closed 1 year ago

shaunlebron commented 2 years ago

I think my docs on meta sugar ^symbol is wrong: http://cljs.github.io/api/syntax/meta

In reagent, I saw ^clj before a param in a function signature, and was wondering how that worked: https://github.com/reagent-project/reagent/blob/9ddf191a6a7338d226161e8af0d7ecc0bc2a6bae/src/reagent/ratom.cljs#L70

My docs say that the ^clj would be evaluated and desugared to {:tag <value of clj>}, but following the desugar-meta function it looks like it would just evaluated to {:tag clj}. Maybe the clojurescript compiler does something with it.