Skip to content

Commit

Permalink
Fix macex1 to keep syntax location for all tuples - Address #1404
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin committed Feb 17, 2024
1 parent 9e0daae commit 7a2868c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/boot/boot.janet
Original file line number Diff line number Diff line change
Expand Up @@ -2136,15 +2136,15 @@
(def m (do (def r (get entry :ref)) (if r (in r 0) (get entry :value))))
(def m? (in entry :macro))
(cond
s (s t)
s (keep-syntax t (s t))
m? (do (setdyn *macro-form* t) (m ;(tuple/slice t 1)))
(tuple/slice (map recur t))))
(keep-syntax! t (map recur t))))

(def ret
(case (type x)
:tuple (if (= (tuple/type x) :brackets)
(tuple/brackets ;(map recur x))
(dotup x))
(tuple/brackets ;(map recur x))
(dotup x))
:array (map recur x)
:struct (table/to-struct (dotable x recur))
:table (dotable x recur)
Expand Down

0 comments on commit 7a2868c

Please sign in to comment.