mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 05:48:27 +02:00
📎 Add improved kondo hook analyzer for rumext/fnc
This commit is contained in:
parent
4dc41724de
commit
e8808bc8a4
2 changed files with 14 additions and 0 deletions
|
@ -58,6 +58,19 @@
|
|||
(api/vector-node [params params])]
|
||||
body))})))
|
||||
|
||||
(defn rumext-fnc
|
||||
[{:keys [node]}]
|
||||
(let [[cname mdata params & body] (rest (:children node))
|
||||
[params body] (if (api/vector-node? mdata)
|
||||
[mdata (cons params body)]
|
||||
[params body])]
|
||||
(let [result (api/list-node
|
||||
(into [(api/token-node 'fn)
|
||||
params]
|
||||
(cons mdata body)))]
|
||||
{:node result})))
|
||||
|
||||
|
||||
(defn penpot-defrecord
|
||||
[{:keys [:node]}]
|
||||
(let [[rnode rtype rparams & other] (:children node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue