Function: lua-ts--nested-function-block-include-matcher

lua-ts--nested-function-block-include-matcher is a byte-compiled function defined in lua-ts-mode.el.gz.

Signature

(lua-ts--nested-function-block-include-matcher NODE P BOL &rest _)

Documentation

Matches if NODE's child at BOL is not another block.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/lua-ts-mode.el.gz
(defun lua-ts--nested-function-block-include-matcher (node _p bol &rest _)
  "Matches if NODE's child at BOL is not another block."
  (let* ((child (treesit-node-first-child-for-pos node bol))
         (child-type (treesit-node-type child))
         (g-g-g-type (treesit-node-type (lua-ts--g-g-g-parent node))))
    (or (equal child-type "assignment_statement")
        (and (equal child-type "return_statement")
             (or (equal g-g-g-type "arguments")
                 (and (equal g-g-g-type "expression_list")
                      (not (treesit-search-subtree child "function_call"))))))))