Allow names to start with underscore
This commit is contained in:
parent
09dc731444
commit
857fa43df0
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
|
||||||
(defun valid-name-p (string)
|
(defun valid-name-p (string)
|
||||||
(assert (stringp string))
|
(assert (stringp string))
|
||||||
(and (not (zerop (length string)))
|
(and (not (zerop (length string)))
|
||||||
(alpha-char-p (char string 0))
|
(or (alpha-char-p (char string 0))
|
||||||
|
(char= (char string 0) #\_))
|
||||||
(loop :for char :across (subseq string 1)
|
(loop :for char :across (subseq string 1)
|
||||||
:always (or (alphanumericp char)
|
:always (or (alphanumericp char)
|
||||||
(char= char #\_)))))
|
(char= char #\_)))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue