Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defpackage tidylisp
- (:use :cl)
- (:export :main))
- (in-package :tidylisp)
- (defvar *quit-on-error-p* nil)
- (defun main ()
- (flet ((syntax-error ()
- (format t "Usage: tidylisp <file>~%")
- (if *quit-on-error-p*
- (uiop/image:quit)
- (return-from main))))
- (unless
- (and (= (length uiop/image:*command-line-arguments*) 1)
- (probe-file (car uiop/image:*command-line-arguments*)))
- (syntax-error))
- (let ((*print-case* :downcase))
- (with-open-file (in (car uiop/image:*command-line-arguments*))
- (loop for form = (read in nil)
- until (not form)
- do (pprint form) (terpri))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement