mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
let[rec]-syntax should not splice
This commit is contained in:
parent
11ad0c3e3d
commit
1f5d816f59
3 changed files with 20 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
|
||||
(define-library (scheme base)
|
||||
(import (except (chibi) equal?)
|
||||
(import (rename (except (chibi) equal?)
|
||||
(let-syntax let-syntax/splicing)
|
||||
(letrec-syntax letrec-syntax/splicing))
|
||||
(rename (chibi equiv) (equiv? equal?))
|
||||
(only (chibi string) string-map string-for-each)
|
||||
(chibi io)
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
|
||||
(define-syntax let-syntax
|
||||
(syntax-rules ()
|
||||
((let-syntax . x)
|
||||
(let () (let-syntax/splicing . x)))))
|
||||
|
||||
(define-syntax letrec-syntax
|
||||
(syntax-rules ()
|
||||
((letrec-syntax . x)
|
||||
(let () (letrec-syntax/splicing . x)))))
|
||||
|
||||
(define-syntax when
|
||||
(syntax-rules ()
|
||||
((when test . body)
|
||||
|
|
|
@ -492,6 +492,13 @@
|
|||
|
||||
(test 'ok (let ((=> #f)) (cond (#t => 'ok))))
|
||||
|
||||
(let ()
|
||||
(define x 1)
|
||||
(let-syntax ()
|
||||
(define x 2)
|
||||
#f)
|
||||
(test 1 x))
|
||||
|
||||
(test-end)
|
||||
|
||||
(test-begin "5 Program structure")
|
||||
|
|
Loading…
Add table
Reference in a new issue