commit ce0fffb15093138a3c9051ec77804dd2e054ef9d Spenser Truex <spensertruexonline@gmail.com> 2018-04-22 16:58:58 -0300 Modified character classes.
utils.lisp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/utils.lisp b/utils.lisp index 2145861..75f1e48 100644 --- a/utils.lisp +++ b/utils.lisp @@ -41,19 +41,10 @@ b ; ; ; ,@body)) (defun number-charp (char) "Aux function." - (or (char= #\0 char) - (char= #\1 char) - (char= #\2 char) - (char= #\3 char) - (char= #\4 char) - (char= #\5 char) - (char= #\6 char) - (char= #\7 char) - (char= #\8 char) - (char= #\9 char))) + (not (null (member char (list #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) :test #'char= )))) (defun whitespace-charp (char) "Aux function." - (or (char= #\Newline char) (char= #\Space char) (char= #\Tab char))) + (not (null (member char (list #\Newline #\Space #\Tab) :test #'char=)))) (defmacro make-read (name charp endp) "The ending character gets eaten, so it is put into VALUES." (with-gensyms (char str stream)