Function: treesit-fold-range-llvm--find-last-instruction

treesit-fold-range-llvm--find-last-instruction is a natively compiled function defined in treesit-fold.el.

Signature

(treesit-fold-range-llvm--find-last-instruction NODE)

Documentation

Find the last instruction node by starting NODE.

Source Code

;; Defined in /nix/store/mpy1l6b4hlzpp59l4vbahq83hqa821ci-emacs-packages-deps/share/emacs/site-lisp/elpa/treesit-fold-0.2.1/treesit-fold.el
(defun treesit-fold-range-llvm--find-last-instruction (node)
  "Find the last instruction node by starting NODE."
  (let* ((iter-node (treesit-fold--next-prev-node-skip-newline node t))
         (last iter-node))
    (while (and iter-node
                (not (member (treesit-node-type iter-node)
                             (treesit-fold-listify '("label" "}")))))
      (setq last iter-node
            iter-node (treesit-fold--next-prev-node-skip-newline iter-node t)))
    last))  ; return last insturction node