{"size": 581, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/syntax/scribblings/strip-context.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-05T21:18:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-04T14:48:37.000Z", "max_issues_repo_path": "pkgs/racket-doc/syntax/scribblings/strip-context.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-05-10T07:33:20.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-19T15:49:46.000Z", "max_forks_repo_path": "pkgs/racket-doc/syntax/scribblings/strip-context.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 4, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 32.2777777778, "max_line_length": 78, "alphanum_fraction": 0.7555938038}
#lang scribble/doc
@(require "common.rkt" (for-label syntax/strip-context))

@title[#:tag "strip-context"]{Replacing Lexical Context}

@defmodule[syntax/strip-context]

@defproc[(strip-context [stx syntax?]) syntax?]{

Removes all lexical context from @racket[stx], preserving
source-location information and properties.}

@defproc[(replace-context [ctx-stx (or/c syntax? #f)] [stx syntax?]) syntax?]{

Uses the lexical context of @racket[ctx-stx] to replace the lexical
context of all parts of @racket[stx], preserving source-location
information and properties of @racket[stx].}
