1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

use unquotes instead

This commit is contained in:
primo-ppcg 2023-06-11 18:38:20 +07:00
parent 1077efd03a
commit 32c5b816ae

View File

@ -675,10 +675,10 @@
(def bl (in bindings i)) (def bl (in bindings i))
(def br (in bindings (+ 1 i))) (def br (in bindings (+ 1 i)))
(if (symbol? bl) (if (symbol? bl)
(tuple 'if (tuple 'def bl br) (aux (+ 2 i)) fal) ~(if (def ,bl ,br) ,(aux (+ 2 i)) ,fal)
(tuple 'if (tuple 'def (def sym (gensym)) br) ~(if (def ,(def sym (gensym)) ,br)
(tuple 'do (tuple 'def bl sym) (aux (+ 2 i))) (do (def ,bl ,sym) ,(aux (+ 2 i)))
fal))))) ,fal)))))
(aux 0)) (aux 0))
(defmacro when-let (defmacro when-let