From 6e5a3f49d979ab1473ab316791a8d8a807e39e40 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 24 Jan 2017 18:37:20 -0800 Subject: [PATCH] touchup --- beautiful-racket-demo/basic-demo/basic-test.rkt | 2 +- beautiful-racket-demo/basic-demo/expander.rkt | 9 ++++----- beautiful-racket-demo/basic-demo/runtime.rkt | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 beautiful-racket-demo/basic-demo/runtime.rkt diff --git a/beautiful-racket-demo/basic-demo/basic-test.rkt b/beautiful-racket-demo/basic-demo/basic-test.rkt index 36468c9..a810db4 100644 --- a/beautiful-racket-demo/basic-demo/basic-test.rkt +++ b/beautiful-racket-demo/basic-demo/basic-test.rkt @@ -4,4 +4,4 @@ 30 rem goto 50 45 print "shite" 50 print "foobar" -30 goto 50 \ No newline at end of file +10 goto 45 diff --git a/beautiful-racket-demo/basic-demo/expander.rkt b/beautiful-racket-demo/basic-demo/expander.rkt index be6b37b..0a458b2 100644 --- a/beautiful-racket-demo/basic-demo/expander.rkt +++ b/beautiful-racket-demo/basic-demo/expander.rkt @@ -1,6 +1,4 @@ #lang br/quicklang -(provide (rename-out [b-module-begin #%module-begin]) - (all-defined-out)) (define-exn-srcloc duplicate-line-number exn:fail) @@ -11,6 +9,7 @@ (raise-duplicate-line-number ($line-srcloc (check-duplicates lines = #:key $line-number)))) (run lines))) +(provide (rename-out [b-module-begin #%module-begin])) (struct $line (number thunk srcloc) #:transparent) @@ -18,9 +17,7 @@ (with-pattern ([SRCLOC (syntax-srcloc caller-stx)]) #'($line LINE-NUMBER (thunk STATEMENT) SRCLOC))) -(define-macro (b-statement (PROC-NAME ARG ...)) - #'(begin (PROC-NAME ARG ...))) - +(define (b-statement stmt) stmt) (define (b-rem str) #f) (define (b-print str) (displayln str)) (define (b-goto line-number) line-number) @@ -28,6 +25,8 @@ (define-exn end-program-signal exn:fail) (define (b-end) (raise-end-program-signal)) +(provide b-line b-statement b-rem b-print b-goto b-end) + (define-exn-srcloc line-not-found exn:fail) (define (run lines) diff --git a/beautiful-racket-demo/basic-demo/runtime.rkt b/beautiful-racket-demo/basic-demo/runtime.rkt deleted file mode 100644 index be963de..0000000 --- a/beautiful-racket-demo/basic-demo/runtime.rkt +++ /dev/null @@ -1,3 +0,0 @@ -#lang br -(provide (all-defined-out)) -(define current-print-status (make-parameter #t)) \ No newline at end of file