remove `shared-syntax`

pull/2/head
Matthew Butterick 8 years ago
parent 460efbf3dc
commit f5078fb50b

@ -43,9 +43,8 @@
(begin-for-syntax
;; expose the caller context within br:define macros with syntax parameter
(require (for-syntax racket/base) racket/stxparam)
(provide caller-stx shared-syntax)
(define-syntax-parameter caller-stx (λ(stx) (error 'caller-stx-not-parameterized)))
(define-syntax-parameter shared-syntax (λ(stx) (error 'shared-syntax-not-parameterized))))
(provide caller-stx)
(define-syntax-parameter caller-stx (λ(stx) (error 'caller-stx-not-parameterized))))
(define-syntax (define-cases stx)
@ -172,10 +171,9 @@
(λ (stx)
(define result
(syntax-parameterize ([caller-stx (make-rename-transformer #'stx)])
(syntax-parameterize ([shared-syntax (make-shared-syntax-macro caller-stx)])
(syntax-case stx LITERALS
(syntax-case stx LITERALS
[pat . result-exprs] ...
else-clause))))
else-clause)))
(if (syntax? result)
result
(datum->syntax #'id result)))))]

@ -6,7 +6,7 @@
(all-from-out racket/list racket/string racket/format racket/match racket/port
br/syntax br/datum br/debug br/cond racket/function br/define)
(for-syntax (all-from-out racket/base racket/syntax br/syntax br/debug))
(for-syntax caller-stx shared-syntax with-shared-id with-calling-site-id)) ; from br/define
(for-syntax caller-stx with-shared-id with-calling-site-id)) ; from br/define
;; todo: activate at-exp reader by default

Loading…
Cancel
Save