#lang scheme/base
(provide
forth-begin
forth-module-begin)
(require
"../tools.ss"
"../target.ss"
"../comp.ss" "../scat.ss"
(for-syntax
"../macro-tx.ss"
"forth-begin-tx.ss"
scheme/base))
(define-syntax (forth-module-begin stx)
(with-macro-syntax (lambda ()
(let ((module-name
(syntax-property
stx 'enclosing-module-name)))
#`(#%plain-module-begin
#,(forth-begin-tx stx
'((provide (all-defined-out)))
#'register-code))))))
(define-syntax (forth-begin stx)
(with-macro-syntax (lambda ()
(forth-begin-tx stx '() #'register-code))))