Function: php-ts-mode--else-heuristic
php-ts-mode--else-heuristic is a byte-compiled function defined in
php-ts-mode.el.gz.
Signature
(php-ts-mode--else-heuristic NODE PARENT BOL &rest _)
Documentation
Heuristic matcher for when "else" is followed by a closing bracket.
PARENT is NODE's parent, BOL is the beginning of non-whitespace characters of the current line.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
;;; Indent
;; taken from c-ts-mode
(defun php-ts-mode--else-heuristic (node parent bol &rest _)
"Heuristic matcher for when \"else\" is followed by a closing bracket.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
(and (null node)
(save-excursion
(forward-line -1)
(looking-at (rx (* whitespace) "else" (* whitespace) eol)))
(let ((next-node (treesit-node-first-child-for-pos parent bol)))
(equal (treesit-node-type next-node) "}"))))