Skip to content

Commit f2f4402

Browse files
committed
fix issue #31
1 parent c33a022 commit f2f4402

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.clj-kondo/hooks/ornament.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
(api/reg-finding! {:row (:row (meta fn-tag))
2929
:col (:col (meta fn-tag))
3030
:message "fn-tag must be at least a list or nil"
31-
:type :lambdaisland.ornament/invalid-syntax}))]
31+
:type :lambdaisland.ornament/invalid-syntax}))
32+
def-class-form (api/list-node
33+
(list (api/token-node 'def)
34+
class-name
35+
(api/token-node 'nil)))]
3236
(if (api/list-node? fn-tag)
3337
(let [[binding-vec & body] (:children fn-tag)
3438
new-node (api/list-node
@@ -39,4 +43,4 @@
3943
(prn :new-node (api/sexpr new-node))
4044
{:node new-node})
4145
;; nil node
42-
{:node true})))
46+
{:node def-class-form})))

0 commit comments

Comments
 (0)