159c993863c4

Less
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 21 Dec 2018 15:33:54 -0500
parents f84403802761
children a8a82a63b876 8324a5a60426
branches/tags (none)
files lisp/compile-parenscript.ros

Changes

--- a/lisp/compile-parenscript.ros	Fri Dec 21 15:30:51 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#!/bin/sh
-#|-*- mode:lisp -*-|#
-#|
-exec ros -Q -- $0 "$@"
-|#
-
-#|
-
-A Roswell script to compile Parenscript files.
-
-Usage
------
-
-    $ compile-parenscript filename...
-
-LICENSE
--------
-
-MIT/X11.
-
-|#
-
-(unless (find-package :uiop)
-  (ql:quickload '(:uiop) :silent t))
-
-(unless (find-package :parenscript)
-  (ql:quickload '(:parenscript) :silent t))
-
-
-(defun terminate (code &optional message &rest args)
-  (when message
-    (format *error-output* "~&~A~%"
-            (apply #'format nil (princ-to-string message) args)))
-  (uiop:quit code))
-
-
-(defun compile-parenscript-file (source)
-  (let* ((source-path (pathname source))
-         (target-path (make-pathname :type "js"
-                                     :defaults source-path)))
-    (with-open-file (output target-path
-                            :direction :output
-                            :if-exists :supersede)
-      (write-string (parenscript::ps-compile-file source-path) output)))
-  (values))
-
-(defun main (&rest filenames)
-  (unless filenames
-    (terminate -1 "Usage: compile-parenscript filename..."))
-  (mapc #'compile-parenscript-file filenames))