mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-16 18:50:23 +02:00
* libguile/vm-engine.h (POP_CONS_MARK): New macro, analagous to POP_LIST_MARK; used in quasiquote on improper lists. * libguile/vm-i-system.c (cons-mark): New instruction. You know the drill, remove all your .go files please. * module/system/il/compile.scm (codegen): Compile quasiquoted improper lists with splices correctly. Additionally check that we don't have slices in the CDR of an improper list. * testsuite/t-quasiquote.scm: Add a test for unquote-splicing in improper lists.
12 lines
180 B
Scheme
12 lines
180 B
Scheme
(list
|
|
`()
|
|
`foo
|
|
`(foo)
|
|
`(foo bar)
|
|
`(1 2)
|
|
(let ((x 1)) `,x)
|
|
(let ((x 1)) `(,x))
|
|
(let ((x 1)) ``(,x))
|
|
(let ((head '(a b))
|
|
(tail 'c))
|
|
`(,@head . ,tail)))
|