Function: treesit-thing-prev
treesit-thing-prev is a byte-compiled function defined in
treesit.el.gz.
Signature
(treesit-thing-prev POS THING &optional PARSER)
Documentation
Return the previous THING at POS.
The returned node, if non-nil, must be before POS, i.e., its end
<= POS.
THING should be a thing defined in treesit-thing-settings, or a
predicate as described in treesit-thing-settings.
If PARSER is non-nil, only use that parser's parse tree. Otherwise each parser covering point is tried from most specific (deepest embedded) to least specific. If there are multiple parsers with the same embed level at POS, which parser is tried first is undefined. If PARSER is a language symbol, the parsers tried are limited to ones for that language.
Probably introduced at or before Emacs version 30.1.
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit-thing-prev (pos thing &optional parser)
"Return the previous THING at POS.
The returned node, if non-nil, must be before POS, i.e., its end
<= POS.
THING should be a thing defined in `treesit-thing-settings', or a
predicate as described in `treesit-thing-settings'.
If PARSER is non-nil, only use that parser's parse tree. Otherwise each
parser covering point is tried from most specific (deepest embedded) to
least specific. If there are multiple parsers with the same embed level
at POS, which parser is tried first is undefined. If PARSER is a
language symbol, the parsers tried are limited to ones for that
language."
(treesit--thing-sibling pos thing t parser))