touchup demos

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

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

@ -20,7 +20,7 @@
[(string? x) "whee"]
[else 'kaboom]))
(define-macro (dsl-module-begin EXPR ...)
(define-macro (my-module-begin EXPR ...)
#'(#%module-begin
(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
"hello world"
(+ 1 (* 2 (- 3)))
(+ 1 (* 2 (- x)))

@ -7,7 +7,7 @@
[(string? x) "whee"]
[else 'kaboom]))
(define-macro (dsl-module-begin EXPR ...)
(define-macro (my-module-begin EXPR ...)
#'(#%module-begin
(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
"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
"hello world"
(+ 1 (* 2 (- 3)))
(+ 1 (* 2 (- x)))
Loading…
Cancel
Save