From 857fa43df07b2b7fc9370c1784481ce9b614a4cd Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Tue, 8 Jul 2025 13:41:16 +0200 Subject: [PATCH] Allow names to start with underscore --- wip-duuqnd/user-side-compiler/tokenizer.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wip-duuqnd/user-side-compiler/tokenizer.lisp b/wip-duuqnd/user-side-compiler/tokenizer.lisp index dc9b651..a240692 100644 --- a/wip-duuqnd/user-side-compiler/tokenizer.lisp +++ b/wip-duuqnd/user-side-compiler/tokenizer.lisp @@ -29,7 +29,8 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.") (defun valid-name-p (string) (assert (stringp 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) :always (or (alphanumericp char) (char= char #\_)))))