Function: dape--inlay-hint-collect-symbols
dape--inlay-hint-collect-symbols is a natively compiled function
defined in dape.el.
Signature
(dape--inlay-hint-collect-symbols START END)
Documentation
Return list of variable symbol candidates between START and END.
Excludes symbols that are part of strings, comments or documentation.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--inlay-hint-collect-symbols (start end)
"Return list of variable symbol candidates between START and END.
Excludes symbols that are part of strings, comments or documentation."
(unless (<= (- end start) 300)
;; Clamp the region size to prevent performance issues
(setq end (+ start 300)))
(save-excursion
(goto-char start)
(cl-loop for symbol = (thing-at-point 'symbol)
when (and symbol
;; Skip symbols in strings, comments, or docstrings
(not (memql (get-text-property 0 'face symbol)
'(font-lock-string-face
font-lock-doc-face
font-lock-comment-face))))
collect (list symbol) into symbol-list
for previous-point = (point)
do (forward-thing 'symbol)
while (and (< previous-point (point))
(<= (point) end))
finally return (delete-dups symbol-list))))