Function: parseclj-lex-keyword
parseclj-lex-keyword is a byte-compiled function defined in
parseclj-lex.el.
Signature
(parseclj-lex-keyword)
Documentation
Return a lex token representing a keyword.
Keywords follow the same rules as symbols, except they start with one or two colon characters.
See parseclj-lex-symbol, parseclj-lex-symbol-start-p.
Source Code
;; Defined in ~/.emacs.d/elpa/parseclj-20231203.1905/parseclj-lex.el
(defun parseclj-lex-keyword ()
"Return a lex token representing a keyword.
Keywords follow the same rules as symbols, except they start with one or
two colon characters.
See `parseclj-lex-symbol', `parseclj-lex-symbol-start-p'."
(let ((pos (point)))
(right-char)
(when (equal (char-after (point)) ?:) ;; same-namespace keyword
(right-char))
(if (equal (char-after (point)) ?:) ;; three colons in a row => lex-error
(progn
(right-char)
(parseclj-lex-error-token pos :invalid-keyword))
(progn
(while (or (parseclj-lex-symbol-rest-p (char-after (point)))
(equal (char-after (point)) ?#))
(right-char))
(parseclj-lex-token :keyword (buffer-substring-no-properties pos (point)) pos)))))