Function: hif-token-concat
hif-token-concat is a byte-compiled function defined in hideif.el.gz.
Signature
(hif-token-concat L)
Documentation
Concatenate a list of tokens into a longer token.
Also support weird (but valid) token concatenation like > ## > becomes >>.
Here we take care only those that can be evaluated during preprocessing time and
ignore all those that can only be evaluated at C(++) runtime (like ++, --
and +=...).
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hif-token-concat (l)
"Concatenate a list of tokens into a longer token.
Also support weird (but valid) token concatenation like `>' ## `>' becomes `>>'.
Here we take care only those that can be evaluated during preprocessing time and
ignore all those that can only be evaluated at C(++) runtime (like `++', `--'
and `+='...)."
(let ((str nil))
(dolist (i l)
;;(assert (not (eq i 'hif-space)) nil ;; debug
;; "Internal error: should not be concatenating `hif-space'")
(setq str
(concat str
(if (memq i hif-valid-token-list)
(car (rassq i hif-token-alist))
(hif-stringify i)))))
;; Check if it's a number, if yes, return the number instead of a symbol.
;; 'hif-value and 'hif-space properties are trimmed off by `hif-stringify'
(hif-strtok str t)))