Fix some typos

This commit is contained in:
2024-09-06 14:58:47 -07:00
parent 0a73cf3295
commit 3fc927fee8
2 changed files with 30 additions and 17 deletions

View File

@ -163,13 +163,19 @@ non-nil, allow names to be more than one character long."
finally
(let ((str (coerce token 'string)))
(return
;; the multi-char token is an operator. its a variable, so defer
;; to multi-char-names
(if (or multi-char-names
(string
(cond
;; single character unary operand
((let ((val (operator-symbol (string (first token)))))
(and (symbolp val) (unary-p val)))
(first token))
;; multi-char variable, constant (true or false), or operator
((or multi-char-names
(operator-symbol str)
(symbolp (interpret-operand str)))
str
(string (first token)))))))
str)
;; single letter variable (multi-char-names is off)
(t (first token))))))))
(defun next-token (str &key multi-char-names)
"Return a list of the next token in STR and how much whitespace it had."