fix r6rs identifier-syntax bug
svn: r9645
This commit is contained in:
parent
875dc56a37
commit
61dcc5d43a
|
@ -1,6 +1,6 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
(require (for-syntax scheme/base)
|
(require (for-syntax scheme/base)
|
||||||
(for-template (only-in scheme/base set!)))
|
(for-template (only-in scheme/base set! #%app)))
|
||||||
|
|
||||||
(provide identifier-syntax)
|
(provide identifier-syntax)
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,9 @@
|
||||||
(define-syntax p.car
|
(define-syntax p.car
|
||||||
(identifier-syntax (car p)))
|
(identifier-syntax (car p)))
|
||||||
|
|
||||||
|
(define-syntax kons
|
||||||
|
(identifier-syntax cons))
|
||||||
|
|
||||||
;; Not the same as in the report, because we avoid `set-car!':
|
;; Not the same as in the report, because we avoid `set-car!':
|
||||||
(define-syntax p2.car
|
(define-syntax p2.car
|
||||||
(identifier-syntax
|
(identifier-syntax
|
||||||
|
@ -1480,6 +1483,8 @@
|
||||||
(test/unspec (set! p2.car 15))
|
(test/unspec (set! p2.car 15))
|
||||||
(test p2.car 15)
|
(test p2.car 15)
|
||||||
(test p '(15 . 5))
|
(test p '(15 . 5))
|
||||||
|
|
||||||
|
(test (kons 1 2) '(1 . 2))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
))
|
))
|
||||||
|
|
|
@ -288,8 +288,5 @@
|
||||||
(test/exn (syntax-violation 'form "bad" 7 8) &syntax)
|
(test/exn (syntax-violation 'form "bad" 7 8) &syntax)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
)
|
))
|
||||||
|
|
||||||
(run-syntax-case-tests)
|
|
||||||
(report-test-results))
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user