Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added some patterns for types

  • Loading branch information...
commit c3875efb4b8f8cc68f42205eb408f6c731a62b15 1 parent 4c66e56
@VincentToups authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 shadchen.el
View
19 shadchen.el
@@ -1068,6 +1068,25 @@ the matching expression from the body."
(shadchen:enumerate-substrings ,-string- ,(length patterns)))
(one-of (list ,@patterns))))))
+(defun shadchen:non-keyword-symbolp (o)
+ (and (symbolp o)
+ (not (keywordp o))))
+
+(defpattern keyword (pattern)
+ `(p #'keywordp ,pattern))
+
+(defpattern symbol (pattern)
+ `(p #'symbolp ,pattern))
+
+(defpattern non-kw-symbol (pattern)
+ `(p #'shadchen:non-keyword-symbolp ,pattern))
+
+(defpattern string (pattern)
+ `(p #'stringp ,pattern))
+
+(defpattern number (pattern)
+ `(p #'numberp ,pattern))
+
(provide 'shadchen)
Please sign in to comment.
Something went wrong with that request. Please try again.