10 Preserving Source Locations

▼ |  | Syntax: Meta-Programming Helpers

1 | Parsing and Specifying Syntax
2 | Syntax Object Helpers
3 | Datum Pattern Matching
4 | Module-Processing Helpers
5 | Macro Transformer Helpers
6 | Reader Helpers
7 | Parsing for Bodies
8 | Unsafe for Clause Transforms
9 | Source Locations
10 | Preserving Source Locations
11 | Non-Module Compilation And Expansion
12 | Trusting Standard Recertifying Transformers
13 | Attaching Documentation to Exports
14 | Contracts for Macro Subexpressions
15 | Macro Testing
16 | Internal-Definition Context Helpers
| Index

On this page:

quote-syntax/ keep-srcloc

6.6
top ← prev up next →

### 10`` Preserving Source Locations

(require syntax/quote) | package: base

The syntax/quote module provides support for quoting syntax so that its source locations are preserved in marshaled bytecode form.

> syntax (quote-syntax/keep-srcloc datum)
> (quote-syntax/keep-srcloc #:source source-expr datum)

Like (quote-syntax datum), but the source locations of datum are preserved. If a source-expr is provided, then it is used in place of a syntax-source value for each syntax object within datum.

Unlike a quote-syntax form, the results of evaluating the expression multiple times are not necessarily eq?.

top ← prev up next →