fix `syntax/loc' to preserve properties

This commit is contained in:
Matthew Flatt 2012-03-25 19:22:57 -06:00
parent 2d87d48ebd
commit 9143c1c7df
2 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,7 @@
(datum->syntax stx
(syntax-e stx)
loc
#f)
stx)
stx))
;; Like syntax, but also takes a syntax object

View File

@ -1433,6 +1433,11 @@
p))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check that `syntax/loc' preserves the 'parent-shape property
(test #\[ syntax-property (syntax/loc #'a [b c]) 'paren-shape)
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(report-errs)