Add PRINT-OBJECT method to TOKEN-NUMBER
This commit is contained in:
parent
12d1a905fe
commit
3f3d94367f
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,11 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
|
|||
(defclass token-number (token)
|
||||
((%value :accessor value :initarg :value)))
|
||||
|
||||
(defmethod print-object ((object token-number) stream)
|
||||
(print-unreadable-object (object stream :type t :identity t)
|
||||
(when (slot-boundp object '%value)
|
||||
(format stream "~D" (value object)))))
|
||||
|
||||
(define-transformation (token (token-number reference-constant))
|
||||
(make-instance 'reference-constant :value (value token)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue