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:
parent
1077efd03a
commit
32c5b816ae
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user