Function: php-ts-mode--defun-object-name

php-ts-mode--defun-object-name is a byte-compiled function defined in php-ts-mode.el.gz.

Signature

(php-ts-mode--defun-object-name NODE NODE-TEXT)

Documentation

Compose the full name of a NODE that is a PHP variable, method, class etc.

If the NODE has a parent, it recursively concat the parent names with NODE-TEXT, otherwise it returns NODE-TEXT.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
(defun php-ts-mode--defun-object-name (node node-text)
  "Compose the full name of a NODE that is a PHP variable, method, class etc.
If the NODE has a parent, it recursively concat the parent names with NODE-TEXT,
otherwise it returns NODE-TEXT."
  (let* ((parent-node (php-ts-mode--parent-object node))
	 (parent-node-text
	  (treesit-node-text
	   (treesit-node-child-by-field-name parent-node "name") t))
	 (parent-node-separator (php-ts-mode--defun-name-separator parent-node)))
    (if parent-node
	(progn
	  (setq parent-node-text
		(php-ts-mode--defun-object-name
		 parent-node
		 parent-node-text))
	  (concat parent-node-text parent-node-separator node-text))
      node-text)))