mirror of
https://github.com/janet-lang/janet
synced 2025-01-23 21:56:52 +00:00
Fix macex1 to keep syntax location for all tuples - Address #1404
This commit is contained in:
parent
9e0daaee09
commit
7a2868c147
@ -2136,15 +2136,15 @@
|
|||||||
(def m (do (def r (get entry :ref)) (if r (in r 0) (get entry :value))))
|
(def m (do (def r (get entry :ref)) (if r (in r 0) (get entry :value))))
|
||||||
(def m? (in entry :macro))
|
(def m? (in entry :macro))
|
||||||
(cond
|
(cond
|
||||||
s (s t)
|
s (keep-syntax t (s t))
|
||||||
m? (do (setdyn *macro-form* t) (m ;(tuple/slice t 1)))
|
m? (do (setdyn *macro-form* t) (m ;(tuple/slice t 1)))
|
||||||
(tuple/slice (map recur t))))
|
(keep-syntax! t (map recur t))))
|
||||||
|
|
||||||
(def ret
|
(def ret
|
||||||
(case (type x)
|
(case (type x)
|
||||||
:tuple (if (= (tuple/type x) :brackets)
|
:tuple (if (= (tuple/type x) :brackets)
|
||||||
(tuple/brackets ;(map recur x))
|
(tuple/brackets ;(map recur x))
|
||||||
(dotup x))
|
(dotup x))
|
||||||
:array (map recur x)
|
:array (map recur x)
|
||||||
:struct (table/to-struct (dotable x recur))
|
:struct (table/to-struct (dotable x recur))
|
||||||
:table (dotable x recur)
|
:table (dotable x recur)
|
||||||
|
Loading…
Reference in New Issue
Block a user