Function: ruby-ts--first-non-comment-child

ruby-ts--first-non-comment-child is a byte-compiled function defined in ruby-ts-mode.el.gz.

Signature

(ruby-ts--first-non-comment-child NODE)

Documentation

Return the first named child of NODE that is not a comment.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-ts-mode.el.gz
(defun ruby-ts--first-non-comment-child (node)
  "Return the first named child of NODE that is not a comment."
  (let ((child (treesit-node-child node 0 t)))
    (while (and child
                (equal "comment" (treesit-node-type child)))
      (setq child (treesit-node-next-sibling child t)))
    child))