(module config mzscheme
(require (planet "list.ss" ("dherman" "list.plt" 1 0))
(lib "etc.ss"))
(define (ecma-strict? flag)
(allow-anonymous-function-source-elements? (not flag))
(infer-do-while-semicolon? (not flag))
(enable-extended-catch-statements? (not flag))
(allow-nested-function-declarations? (not flag)))
(define allow-anonymous-function-source-elements? (make-parameter #t))
(define infer-do-while-semicolon? (make-parameter #f))
(define enable-extended-catch-statements? (make-parameter #f))
(define allow-nested-function-declarations? (make-parameter #f))
(define proper-tail-recursion? (make-parameter #f))
(define stack-limit (make-parameter #f))
(define allow-eval-aliasing? (make-parameter #f))
(define code-representation (make-parameter 'standard))
(define lexical-keywords (make-parameter '(break case catch const continue
debugger default delete do else enum
false finally for function if instanceof in
new null return switch this throw true
try typeof var void while with)))
(define make-keyword-parameter
(opt-lambda (kw [init #f])
(let ([p (make-parameter #f
(lambda (b)
(if b
(lexical-keywords (lset-adjoin eq? (lexical-keywords) kw))
(lexical-keywords (lset-difference eq? (lexical-keywords) (list kw))))))])
(when init
(p #t))
p)))
(define let-expression? (make-keyword-parameter 'let #t))
(provide (all-defined-except make-keyword-parameter)))