Rename TOKEN-NAME's TEXT slot to NAME to match TOKEN-KEYWORD

This commit is contained in:
John Lorentzson 2025-05-20 12:29:24 +02:00
parent 45a66ce323
commit 25fd7675d0

View file

@ -21,7 +21,7 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
;; Tokens containing user data
(defclass token-name (token)
((%text :accessor text :initarg :text)))
((%name :accessor name :initarg :text)))
(defclass token-number (token)
((%value :accessor value :initarg :value)))
@ -145,7 +145,7 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
(cond ((typep token 'token-keyword)
(format nil "~A" (name token)))
((typep token 'token-name)
(text token))
(name token))
((typep token 'token-number)
(format nil "~D" (value token)))
(t (car (find (type-of token) *operator-token-classes* :key #'cadr))))))