Function: lua-ts--named-function-p

lua-ts--named-function-p is a byte-compiled function defined in lua-ts-mode.el.gz.

Signature

(lua-ts--named-function-p NODE)

Documentation

Matches if NODE is a named function.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/lua-ts-mode.el.gz
(defun lua-ts--named-function-p (node)
  "Matches if NODE is a named function."
  (let ((type (treesit-node-type node)))
    (or (equal "function_declaration" type)
        (and (equal "field" type)
             (equal "function_definition"
                    (treesit-node-type
                     (treesit-node-child-by-field-name
                      node "value")))
             (treesit-node-child-by-field-name node "name")))))