sasagawa888 / eisl

ISLisp interpreter/compiler
Other
288 stars 24 forks source link

Unquote doesn't work inside vector syntax #302

Closed arvyy closed 1 year ago

arvyy commented 1 year 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 1 year 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)))
>