(def update-compiler void) (let ((C NIL)) (with-bindings {[eval (λ (x) (set! C (cons (compile-thunk (macroexpand x)) C)))]} (load "instructions.sl") (load "compiler.sl")) (set! update-compiler (λ () (for-each (λ (x) (x)) (reverse! C)) (set! update-compiler void)))) (def (compile-file inf) (let ((in (file inf :read))) (let next ((E (read in))) (unless (io-eof? in) (print (compile-thunk (macroexpand E))) (newline) (next (read in)))) (io-close in))) (def (do-boot0) (for-each (λ (file) (compile-file file)) (cdr *argv*))) (update-compiler)(do-boot0)
(def update-compiler void)
(let ((C NIL))
(with-bindings {[eval (λ (x) (set! C (cons (compile-thunk (macroexpand x))
C)))]}
(load "instructions.sl")
(load "compiler.sl"))
(set! update-compiler
(λ () (for-each (λ (x) (x)) (reverse! C))
(set! update-compiler void))))
(def (compile-file inf)
(let ((in (file inf :read)))
(let next ((E (read in)))
(unless (io-eof? in)
(print (compile-thunk (macroexpand E)))
(newline)
(next (read in))))
(io-close in)))
(def (do-boot0)
(for-each (λ (file) (compile-file file))
(cdr *argv*)))
(update-compiler)
(do-boot0)