Skip to content

Commit

Permalink
check symbols are exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolph-miller committed Aug 27, 2015
1 parent 2db3ad7 commit abeb816
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/helper.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@

(defun normalize-form (object)
(flet ((unquote-when-comma (item)
#+sbcl
#+sb-impl-comma
(if (comma-p item)
(normalize-form (comma-expr item))
(if (or (keywordp item)
(stringp item))
item
(list 'quote item)))
#-sbcl
#+sb-impl-comma
(error "Not supported."))
(make-quote (sym)
(if (or (keywordp sym)
Expand Down
18 changes: 10 additions & 8 deletions src/util.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

(eval-when (:compile-toplevel :load-toplevel :execute)
#+sbcl
(when (find-package :sb-impl)
(push :sb-impl *features*)))
(when (and (find-package :sb-impl)
(find-symbol "COMMA-P" :sb-impl)
(find-symbol "COMMA-EXPR") :sb-impl)
(push :sb-impl-comma *features*)))

(defun my-plist-p (list)
(typecase list
Expand All @@ -32,19 +34,19 @@
(intern str #.(find-package :keyword)))

(defun comma-p (comma)
#+sb-impl
#+sb-impl-comma
(sb-impl::comma-p comma)
#-sb-impl
#-sb-impl-comma
(error "Not supported."))

(defun comma-expr (comma)
#+sb-impl
#+sb-impl-comma
(sb-impl::comma-expr comma)
#-sb-impl
#-sb-impl-comma
nil)

(defvar *quasiquote*
#+sb-impl
#+sb-impl-comma
'sb-int:quasiquote
#-sb-impl
#-sb-impl-comma
nil)

0 comments on commit abeb816

Please sign in to comment.