-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquoted.rkt
54 lines (45 loc) · 976 Bytes
/
quoted.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#lang yaml-exp racket/base
- require:
- for-syntax:
- racket/base
- only-in:
- "reader.rkt"
- install-yaml-read-interaction
- provide:
- rename-out:
- quoted-modbeg: [!sym "#%module-begin"]
- quoted-top-interaction: [!sym "#%top-interaction"]
- top-interacted
- install-yaml-read-interaction:
- define:
- top-interacted: [doc]
- writeln: [doc]
- define-syntax:
- quoted-modbeg: [stx]
- syntax-case:
- stx
- null
- [_, data, ...]:
- syntax/loc:
- stx
- !sym "#%module-begin":
- for-each: [writeln, [quote: [data]]]
- ...
- define-syntax:
- quoted-top-interaction: [stx]
- syntax-case:
- stx
- null
- {_: expr}:
- syntax/loc:
- stx
- top-interacted: [quote: [expr]]
- module:
- reader
- syntax/module-reader
- yaml-exp/quoted
- !kw read
- read-yaml-exp
- !kw read-syntax
- read-yaml-exp-syntax
- require: ["reader-impl.rkt"]