Skip to content

Commit

Permalink
Introduced cl-syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
windymelt committed Dec 2, 2018
1 parent 4c1a733 commit c8cee5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cl-punch.asd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:version "0.1"
:author "Windymelt"
:license "MIT"
:depends-on ()
:depends-on (:cl-syntax)
:components ((:module "src"
:components
((:file "cl-punch"))))
Expand Down
7 changes: 3 additions & 4 deletions src/cl-punch.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
(let ((result-inner-form (mapcar #'replace-underscore form)))
`(lambda ,(nreverse arg-symbol-list) ,result-inner-form)))))

(defun %enable-punch-syntax ()
(setf *readtable* (copy-readtable))
(set-macro-character #\^ #'punch-reader))
(cl-syntax:defsyntax punch-syntax
(:macro-char #\^ #'punch-reader))

(defmacro enable-punch-syntax ()
'(eval-when (:compile-toplevel :load-toplevel :execute)
(%enable-punch-syntax)))
(cl-syntax:use-syntax punch-syntax)))

0 comments on commit c8cee5f

Please sign in to comment.