diff --git a/beautiful-racket-demo/scriptish-demo/expander.rkt b/beautiful-racket-demo/scriptish-demo/expander.rkt index b75cc7c..80cbc84 100644 --- a/beautiful-racket-demo/scriptish-demo/expander.rkt +++ b/beautiful-racket-demo/scriptish-demo/expander.rkt @@ -19,10 +19,11 @@ #'(make-hash (list (cons K V) ...))) (define-macro (func-def (ARG ...) STMT ...) - #'(λ (ARG ...) + (syntax/loc caller-stx + (λ (ARG ...) (let/cc return-cc (syntax-parameterize ([return (make-rename-transformer #'return-cc)]) - STMT ... (void))))) + STMT ... (void)))))) (define-syntax-parameter return (λ (stx) (error 'not-parameterized))) diff --git a/beautiful-racket-demo/scriptish-demo/test.rkt b/beautiful-racket-demo/scriptish-demo/test.rkt index 8daa65c..e36655c 100644 --- a/beautiful-racket-demo/scriptish-demo/test.rkt +++ b/beautiful-racket-demo/scriptish-demo/test.rkt @@ -14,7 +14,7 @@ var thing = { }; thing.foo; // prints 42 -thing.bar; // prints # +thing.bar; // prints # thing.bar(3); // prints 18 if ( thing.foo == 42 ) {