(module reader syntax/module-reader
-ignored-
#:wrapper2
(lambda (in rd stx?)
(let* ([lang `(file ,(path->string (resolved-module-path-name moby-lang-path)))]
[mod
(parameterize ([read-decimal-as-inexact #f])
(rd in))]
[mod (if stx? mod (datum->syntax #f mod))]
[r (syntax-case mod ()
[(module name lang* . body)
(cond
[(and (pair? (syntax-e #'body))
(not (null? (cdr (syntax-e #'body)))))
(with-syntax ([lang (datum->syntax
#'lang* lang #'lang*)])
(syntax/loc mod (module name lang . body)))]
[else
(with-syntax ([lang (datum->syntax
#'lang* lang #'lang*)]
[sentinel (datum->syntax #'lang* '(void) #'lang*)])
(syntax/loc mod (module name lang . (sentinel . body))))])])])
(if stx? r (syntax->datum r))))
(require scheme/runtime-path)
(define-runtime-module-path moby-lang-path "../moby-lang.ss"))