diff --git a/beautiful-racket-lib/br/scribblings/br.scrbl b/beautiful-racket-lib/br/scribblings/br.scrbl index 8edb03e..3f796a8 100644 --- a/beautiful-racket-lib/br/scribblings/br.scrbl +++ b/beautiful-racket-lib/br/scribblings/br.scrbl @@ -446,4 +446,15 @@ Create a new identifier within the lexical context of @racket[id] with the same (define-% foo 42) foo% ] -} \ No newline at end of file +} + +@(require (for-label syntax/strip-context)) +@defproc[(strip-bindings [stx syntax?]) syntax?]{ + +Removes all bindings from @racket[stx], but preserves +source-location information and properties. An alias for @racket[strip-context].} + +@defproc[(replace-bindings [stx-source (or/c syntax? #f)] [stx-target syntax?]) syntax?]{ + +Uses the bindings from @racket[stx-source] to replace the bindings of all parts of @racket[stx-target], while preserving source-location +information and properties. An alias for @racket[replace-context].} \ No newline at end of file diff --git a/beautiful-racket-lib/br/syntax.rkt b/beautiful-racket-lib/br/syntax.rkt index 30adf81..50192bf 100644 --- a/beautiful-racket-lib/br/syntax.rkt +++ b/beautiful-racket-lib/br/syntax.rkt @@ -7,7 +7,8 @@ br/private/syntax-flatten) (provide (all-defined-out) syntax-flatten - (all-from-out syntax/strip-context)) + (rename-out [strip-context strip-bindings] + [replace-context replace-bindings])) (module+ test (require rackunit))