sasagawa888 / eisl

ISLisp interpreter/compiler
Other
267 stars 22 forks source link

Unquote doesn't work inside vector syntax #302

Closed arvyy closed 8 months ago

arvyy commented 8 months ago

Given:

(defmacro test (a) `(list #(1 ,a)))
(test 2)

I'd expect it to result (#(1 2)) but instead it gives (#(1 (UNQUOTE A)))

sasagawa888 commented 8 months ago

I fixed. Thank you.

(defmacro foo (a) `(list #(1 ,a)))

;(foo 2)
;return (#(1 2))

(defmacro bar (a) `(list #2a((1 ,a)(2 , a))))
;(bar 3)
;(#2a((1 3) (2 3)))

> (foo 2)
(#(1 2))
> (bar 3)
(#2a((1 3) (2 3)))
>