-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support trailing metadata in defn #567
Comments
borkdude
added a commit
that referenced
this issue
Jun 1, 2021
borkdude
added a commit
to babashka/babashka
that referenced
this issue
Jun 1, 2021
For future reference, we started supporting this because the omniconf library used this. I found this back using (ns trailing-meta)
(require
'[clojure.core.specs.alpha :as specs]
'[clojure.spec.alpha :as s]
'[grasp.api :as g])
(s/def ::defn (s/cat :defn #{'defn} :args ::specs/defn-args))
(s/def ::defn-trailing-attr-map (s/and ::defn (fn [conformed]
(->> conformed
:args :fn-tail second :attr-map))))
(def matches (g/grasp "/Users/borkdude/.m2" ::defn-trailing-attr-map))
;; (prn (s/conform ::defn-trailing-attr-map (first matches)))
(run! (comp prn meta) matches)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Merely for compatibility
The text was updated successfully, but these errors were encountered: