Function: treesit-thing-next
treesit-thing-next is a byte-compiled function defined in
treesit.el.gz.
Signature
(treesit-thing-next POS THING &optional PARSER)
Documentation
Return the next THING at POS.
The returned node, if non-nil, must be after POS, i.e., its start >= 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.
Other relevant functions are documented in the treesit group.
Probably introduced at or before Emacs version 30.1.
Shortdoc
;; treesit
(treesit-thing-next 3943 'sexp)
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit-thing-next (pos thing &optional parser)
"Return the next THING at POS.
The returned node, if non-nil, must be after POS, i.e., its
start >= 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 nil parser))