forgot to change mztext to use a plain namespace too; made evaluations use read-syntax for general karma
svn: r8816
This commit is contained in:
parent
f7042d063a
commit
eff876671d
|
@ -21,7 +21,7 @@
|
|||
#:multi
|
||||
[("-E" "--eval") expr "evaluates <expr> before processing starts"
|
||||
(parameterize ([read-case-sensitive #t])
|
||||
(add-eval (read (open-input-string expr))))]
|
||||
(add-eval (read-syntax 'command-line (open-input-string expr))))]
|
||||
#:once-each
|
||||
[("--debug") "show preprocessed Scheme code (for debugging)"
|
||||
(debug? #t)]
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
(define (pp-repl)
|
||||
(let loop ()
|
||||
(let ([x (read)])
|
||||
(let ([x (read-syntax)])
|
||||
(unless (eof-object? x)
|
||||
(call-with-values (lambda () (eval x)) show)
|
||||
(loop)))))
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#:multi
|
||||
[("-E" "--eval") expr "evaluates <expr> before processing starts"
|
||||
(parameterize ([read-case-sensitive #t])
|
||||
(add-eval (read (open-input-string expr))))]
|
||||
(add-eval (read-syntax 'command-line (open-input-string expr) )))]
|
||||
#:handlers
|
||||
(lambda (_ . files) (run preprocess run-cmd output files))
|
||||
'("input-file")
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
(value->cont vs cont))))))
|
||||
(cond [(regexp-try-match (command-marker-here-re) (stdin))
|
||||
=> (lambda (here) (display (car here)) (cont))]
|
||||
[else (let ((r (read))) (do-thunk (lambda () (eval r))))]))
|
||||
[else (let ((r (read-syntax))) (do-thunk (lambda () (eval r))))]))
|
||||
|
||||
(provide paren-pairs)
|
||||
(define paren-pairs
|
||||
|
@ -305,12 +305,11 @@
|
|||
;;=============================================================================
|
||||
;; Invocation
|
||||
|
||||
(define-namespace-anchor nsa)
|
||||
|
||||
(define (initialize)
|
||||
(read-case-sensitive #t)
|
||||
(unless (command-marker) (command-marker "@"))
|
||||
(current-namespace (namespace-anchor->namespace nsa))
|
||||
(namespace-require 'scheme/base)
|
||||
(namespace-require 'preprocessor/mztext)
|
||||
(do-evals))
|
||||
|
||||
(define (run)
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
(delete-file file)
|
||||
(rename-file-or-directory temp file))))]
|
||||
[output
|
||||
(with-output-to-file output (lambda () (apply preprocess files)) #:exists 'replace)
|
||||
(with-output-to-file output #:exists 'replace
|
||||
(lambda () (apply preprocess files)))
|
||||
(when run-cmd (do-run-subst output))]
|
||||
[else (apply preprocess files)])
|
||||
(exit exit-code)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user