Add print-object methods for some regex classes.
This commit is contained in:
@ -108,6 +108,10 @@ must appear after this repetition.")
|
||||
register."))
|
||||
(:documentation "REPETITION objects represent repetitions of regexes."))
|
||||
|
||||
(defmethod print-object ((repetition repetition) stream)
|
||||
(print-unreadable-object (repetition stream :type t :identity t)
|
||||
(princ (regex repetition) stream)))
|
||||
|
||||
(defclass register (regex)
|
||||
((regex :initarg :regex
|
||||
:accessor regex
|
||||
@ -122,6 +126,10 @@ This is the index into *REGS-START* and *REGS-END*.")
|
||||
:documentation "Name of this register or NIL."))
|
||||
(:documentation "REGISTER objects represent register groups."))
|
||||
|
||||
(defmethod print-object ((register register) stream)
|
||||
(print-unreadable-object (register stream :type t :identity t)
|
||||
(princ (regex register) stream)))
|
||||
|
||||
(defclass standalone (regex)
|
||||
((regex :initarg :regex
|
||||
:accessor regex
|
||||
@ -181,6 +189,10 @@ string because the SCAN function has done this already.")
|
||||
STR which starts END-STRING (a slot of MATCHER)."))
|
||||
(:documentation "STR objects represent string."))
|
||||
|
||||
(defmethod print-object ((str str) stream)
|
||||
(print-unreadable-object (str stream :type t :identity t)
|
||||
(princ (str str) stream)))
|
||||
|
||||
(defclass anchor (regex)
|
||||
((startp :initarg :startp
|
||||
:reader startp
|
||||
|
||||
Reference in New Issue
Block a user