1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-22 19:27:43 +00:00

Add support for nested quasiquotation.

This brings Janet more in line with Scheme,
Common Lisp, and Clojure.
This commit is contained in:
Calvin Rose
2019-12-04 16:40:53 -06:00
parent f39cf702db
commit 4199c42fe2
2 changed files with 24 additions and 8 deletions

View File

@@ -265,4 +265,9 @@
(assert (= (in buf 0) 0) "cryptorand doesn't overwrite buffer")
(assert (= (length buf) 2) "cryptorand appends to buffer"))
# Nested quasiquotation
(def nested ~(a ~(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f))
(assert (deep= nested '(a ~(b ,(+ 1 2) ,(foo 4 d) e) f)) "nested quasiquote")
(end-suite)