Commit f783c2cc94fef143a124cfa2ac8dc2d51d191d60

Thomas de Grivel 2018-06-13T11:17:00

add token printers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/css-lexer.lisp b/css-lexer.lisp
index bbf4c09..2c99ae2 100644
--- a/css-lexer.lisp
+++ b/css-lexer.lisp
@@ -486,3 +486,10 @@
   (assert (eq 'character (stream-element-type stream)))
   (make-instance 'css-lexer :stream stream))
                  
+(defmethod print-object ((object ident-token) stream)
+  (print-unreadable-object (object stream :type t :identity t)
+    (format stream "~S" (token-string object))))
+
+(defmethod print-object ((object hash-token) stream)
+  (print-unreadable-object (object stream :type t :identity t)
+    (format stream "~S" (token-string object))))