diff --git a/collects/honu/core/main.rkt b/collects/honu/core/main.rkt index c3b7d9781c..e3307a3f4e 100644 --- a/collects/honu/core/main.rkt +++ b/collects/honu/core/main.rkt @@ -33,6 +33,7 @@ [honu-new new] [honu-while while] [honu-macro macro] + [honu-phase phase] [honu-primitive-macro primitive_macro] [honu-pattern pattern] [racket:read-line readLine] diff --git a/collects/honu/core/private/macro2.rkt b/collects/honu/core/private/macro2.rkt index d450814d74..3ac8799a69 100644 --- a/collects/honu/core/private/macro2.rkt +++ b/collects/honu/core/private/macro2.rkt @@ -449,3 +449,13 @@ (make name)))) #'rest #f)]))) + +;; like begin-for-syntax +(provide honu-phase) +(define-honu-syntax honu-phase + (lambda (code) + (syntax-parse code #:literal-sets (cruft) + [(_ (#%braces body ...) . rest) + (define out + (phase1:racket-syntax (begin-for-syntax (parse-stuff body ...)))) + (values out #'rest #t)])))