Function: go-ts-mode--get-functions-in-range

go-ts-mode--get-functions-in-range is a byte-compiled function defined in go-ts-mode.el.gz.

Signature

(go-ts-mode--get-functions-in-range START END)

Documentation

Return a list with the names of all defuns in the range START to END.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/go-ts-mode.el.gz
(defun go-ts-mode--get-functions-in-range (start end)
  "Return a list with the names of all defuns in the range START to END."
  (let* ((node (go-ts-mode--find-defun-at start))
         (name (treesit-defun-name node))
         (node-start (treesit-node-start node))
         (node-end (treesit-node-end node)))
    (cond ((or (not node)
               (> start node-end)
               (< end node-start))
           nil)
          ((or (not (equal (treesit-node-type node) "function_declaration"))
               (not (string-prefix-p "Test" name)))
           (go-ts-mode--get-functions-in-range (treesit-node-end node) end))
          (t
           (cons (go-ts-mode--get-function-regexp name)
                 (go-ts-mode--get-functions-in-range (treesit-node-end node) end))))))