#lang scheme/base
(require (except-in "compiler/lang.ss" require provide)
"stub/parser.ss"
"compiler/stx.ss"
"stub/world-config.ss"
"stub/jsworld.ss"
"serve.ss"
"stub/world.ss"
"stub/net.ss"
"compiler/effect-struct.ss"
"stub/location.ss"
(for-syntax scheme/base
"stx-helpers.ss"))
(define-for-syntax source-code #'not-initialized-yet)
(define-syntax (-js-big-bang stx)
(syntax-case stx ()
[(_ world0 handlers ...)
(syntax/loc stx
(void world0 handlers ...))]))
(define-syntax (-#%module-begin stx)
(syntax-case stx ()
[(mb form ...)
(begin
(let ([name (symbol->string (or (syntax-property stx
'enclosing-module-name)
'unknown))])
(set! source-code (map syntax->stx (syntax->list #'(form ...))))
(with-syntax ([source-code source-code]
[module-name name])
(syntax/loc stx
(#%module-begin
form ...
(compile-and-serve 'source-code module-name))))))]))
(provide (except-out (all-from-out "compiler/lang.ss") #%module-begin)
(rename-out (-#%module-begin #%module-begin))
(all-from-out "stub/parser.ss")
(all-from-out "stub/world.ss")
(all-from-out "stub/net.ss")
(all-from-out "compiler/effect-struct.ss")
(all-from-out "stub/location.ss")
void
remove
on-key on-key*
on-tick on-tick*
on-location-change on-location-change*
on-tilt on-tilt*
on-acceleration on-acceleration*
on-shake on-shake*
on-redraw on-draw
stop-when
initial-effect
(rename-out (-js-big-bang js-big-bang))
js-div
js-p
js-button
js-button*
js-input
js-bidirectional-input
js-img
js-text
js-node
get-input-value)