#lang scheme/base
(require scheme/contract
"private/syntax/parse.ss"
"private/syntax/sexp.ss"
(prefix-in eval: "private/runtime/eval.ss")
"private/runtime/namespace.ss")
(define (js-eval src [ns (make-js-namespace)])
(cond
[(syntax? src) (eval:eval-compiled-javascript src ns)]
[else (eval:eval-javascript-string src ns)]))
(define (js-eval/sexp src [ns (make-js-namespace)])
(eval:eval-javascript src ns))
(provide/contract [js-eval (((or/c input-source? syntax?)) (namespace?) . ->* . any)]
[js-eval/sexp ((sexp?) (namespace?) . ->* . any)])