Fix some typos
This commit is contained in:
16
parse.lisp
16
parse.lisp
@ -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."
|
||||
|
Reference in New Issue
Block a user