touchup demos

pull/21/head
Matthew Butterick 6 years ago
parent 70acaa4394
commit 5adc13ec08

@ -1,4 +1,4 @@
#lang racket #lang br
(provide #%top-interaction #%module-begin (provide #%top-interaction #%module-begin
(rename-out [my-datum #%datum] (rename-out [my-datum #%datum]
[my-datum #%top] [my-datum #%top]

@ -20,7 +20,7 @@
[(string? x) "whee"] [(string? x) "whee"]
[else 'kaboom])) [else 'kaboom]))
(define-macro (dsl-module-begin EXPR ...) (define-macro (my-module-begin EXPR ...)
#'(#%module-begin #'(#%module-begin
(convert-expr 'EXPR) ...)) (convert-expr 'EXPR) ...))
(provide (rename-out [dsl-module-begin #%module-begin])) (provide (rename-out [my-module-begin #%module-begin]))

@ -1,4 +1,4 @@
#lang conjunction-demo #lang conjunction-demo
"hello world" "hello world"
(+ 1 (* 2 (- 3))) (+ 1 (* 2 (- x)))

@ -7,7 +7,7 @@
[(string? x) "whee"] [(string? x) "whee"]
[else 'kaboom])) [else 'kaboom]))
(define-macro (dsl-module-begin EXPR ...) (define-macro (my-module-begin EXPR ...)
#'(#%module-begin #'(#%module-begin
(convert-expr 'EXPR) ...)) (convert-expr 'EXPR) ...))
(provide (rename-out [dsl-module-begin #%module-begin])) (provide (rename-out [my-module-begin #%module-begin]))

@ -1,4 +1,4 @@
#lang s-exp expand-only-demo #lang s-exp expand-only-demo
"hello world" "hello world"
(+ 1 (* 2 (- 3))) (+ 1 (* 2 (- x)))

@ -0,0 +1,18 @@
#lang br
(provide #%top-interaction #%module-begin
(rename-out [my-datum #%datum]
[my-datum #%top]
[my-app #%app]))
(define-macro (my-datum . THING)
(define datum (syntax->datum #'THING))
(cond
[(string? datum) #'"whee"]
[(number? datum) #'42]
[else #''kaboom]))
(define-macro (my-app FUNC . ARGS)
#'(list FUNC . ARGS))
(module reader syntax/module-reader
injunction-demo)

@ -0,0 +1,4 @@
#lang injunction-demo
"hello world"
(+ 1 (* 2 (- x)))

@ -1,4 +1,4 @@
#lang read-only-demo #lang read-only-demo
"hello world" "hello world"
(+ 1 (* 2 (- 3))) (+ 1 (* 2 (- x)))
Loading…
Cancel
Save