Define bootstrap function
authorDavid Vazquez <davazp@gmail.com>
Mon, 17 Dec 2012 13:34:37 +0000 (13:34 +0000)
committerDavid Vazquez <davazp@gmail.com>
Mon, 17 Dec 2012 13:34:37 +0000 (13:34 +0000)
lispstrack.lisp

index 8481fb7..70f8f6a 100644 (file)
       (setq *toplevel-compilations* nil))))
 
 #+common-lisp
-(defun ls-compile-file (filename output)
-  (with-open-file (in filename)
-    (with-open-file (out output :direction :output :if-exists :supersede)
-      (loop
-         for x = (ls-read in)
-         until (eq x *eof*)
-         for compilation = (ls-compile-toplevel x)
-         when compilation do (write-line (concat compilation "; ") out)))))
-
-;;; Testing
-(defun compile-test ()
-  (ls-compile-file "test.lisp" "test.js"))
+(progn
+  (defun ls-compile-file (filename output)
+    (with-open-file (in filename)
+      (with-open-file (out output :direction :output :if-exists :supersede)
+        (loop
+           for x = (ls-read in)
+           until (eq x *eof*)
+           for compilation = (ls-compile-toplevel x)
+           when compilation do (write-line (concat compilation "; ") out)))))
+  (defun bootstrap ()
+    (ls-compile-file "lispstrack.lisp" "lispstrack.js")))