You might find make-wrapping-module-begin from syntax/modbeg useful here: http://docs.racket-lang.org/syntax/module-helpers.html#%28def._%28%28lib._syntax%2Fwrap-modbeg..rkt%29._make-wrapping-module-begin%29%29
Alexis > On Aug 16, 2018, at 18:58, Vityou <zlee...@gmail.com> wrote: > > I'm attempting to make a language similar to scribble. I'm using the > `make-at-reader` that scribble provides, and have my module-begin as this: > > (define-syntax md-module-begin > (syntax-parser > [(_ (expr1 ...)) #'(#%module-begin (define doc (parse-markdown > (string-append (begin expr1) ...))) > (provide doc) > doc)])) > > This works good for normal expressions, but when I try to do something like > `define`, it complains that it is not allowed in expression context. I tried > fixing this by wrapping expressions in `begin`, but I still get the same > error. Is there any way to fix this? Thanks for any help. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.