Function: combobulate-node-at-point
combobulate-node-at-point is a natively compiled function defined in
combobulate-navigation.el.
Signature
(combobulate-node-at-point &optional NODE-TYPES NAMED-ONLY)
Documentation
Return the smallest syntax node at point whose type is one of NODE-TYPES
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-navigation.el
(defun combobulate-node-at-point (&optional node-types named-only)
"Return the smallest syntax node at point whose type is one of NODE-TYPES "
(let* ((p (point))
(node (combobulate-node-on p p nil named-only)))
(if node-types
(let ((this node))
(catch 'done
(while this
(let ((smallest-node (combobulate-node-descendant-for-range
this
(combobulate-node-start this)
(combobulate-node-start this))))
(cond
((member (combobulate-node-type this) node-types)
(throw 'done this))
((member (combobulate-node-type smallest-node) node-types)
(throw 'done smallest-node))
(t (setq this (combobulate-node-parent this))))
))))
node)))