-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.scrbl
49 lines (46 loc) · 1.66 KB
/
index.scrbl
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
#lang scribble/manual
@require[(for-syntax racket/base syntax/parse)]
@title{The Examples}
@(define-syntax (include-example stx)
(syntax-parse stx
[(_ ?name:str)
#:with scrbl-path-str (let ([name (syntax-e #'?name)])
(path->string
(path-add-extension (build-path name name) #".scrbl")))
#:fail-unless (file-exists? (syntax-e #'scrbl-path-str))
(format "file '~a' does not exist, cannot render example"
(syntax-e #'scrbl-path-str))
(syntax/loc stx
(include-section scrbl-path-str))]))
@; =============================================================================
@include-example{displaylns}
@include-example{defines}
@include-example{let-star}
@include-example{first-class-or}
@include-example{optional-assert}
@include-example{make-variable}
@include-example{define-curry}
@include-example{cross-macro-communication}
@include-example{while-break}
@include-example{define-extend}
@include-example{def}
@include-example{conditional-require}
@include-example{multi-check-true}
@include-example{define-datum-literal-set}
@include-example{rec-contract}
@include-example{log-once}
@include-example{marc-matcher}
@include-example{struct-list}
@include-example{syntax-class-contract}
@include-example{except-in-quiet}
@include-example{dot-underscore}
@include-example{try-catch-finally}
@include-example{kw-ctc}
@include-example{pyret-for}
@include-example{hierarchical-cmdline}
@include-example{flaggable-app}
@include-example{js-dict}
@include-example{define-freevar}
@include-example{fnarg}
@include-example{fresh-variable}
@include-example{define-with-datum+}