Function: php-ts-mode--pipe-heuristic
php-ts-mode--pipe-heuristic is a byte-compiled function defined in
php-ts-mode.el.gz.
Signature
(php-ts-mode--pipe-heuristic NODE PARENT BOL &rest _)
Documentation
Return the start of the previous pipe to the current pipe NODE.
Otherwise return the beginning of line of the previous non pipe NODE.
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
(defun php-ts-mode--pipe-heuristic (node parent _bol &rest _)
"Return the start of the previous pipe to the current pipe NODE.
Otherwise return the beginning of line of the previous non pipe NODE.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
(save-excursion
(let* ((parent-start (treesit-node-start parent))
(node-start (treesit-node-start node))
(bound (progn
(goto-char parent-start)
(beginning-of-line 1)
(point))))
(goto-char node-start)
(let ((previous-pipe (search-backward "|>" bound t nil)))
(or previous-pipe (+ bound php-ts-indent-offset))))))