Commit 4033155d39a56c5be306bf9307ece27fde3b9457

Thomas de Grivel 2018-06-18T10:28:01

match

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/parser.lisp b/parser.lisp
index 0efe58d..c863dc6 100644
--- a/parser.lisp
+++ b/parser.lisp
@@ -98,7 +98,7 @@
 
 (defmethod match ((pr parser) (type symbol))
   (let ((item (parser-match-token pr 0)))
-    (when (subtypep (type-of item) (find-class type))
+    (when (and item (subtypep (type-of item) (find-class type)))
       (incf (the fixnum (parser-match-start pr)))
       item)))