Function: rust-ts-mode--comment-docstring

rust-ts-mode--comment-docstring is a byte-compiled function defined in rust-ts-mode.el.gz.

Signature

(rust-ts-mode--comment-docstring NODE OVERRIDE START END &rest ARGS)

Documentation

Use the comment or documentation face appropriately for comments.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/rust-ts-mode.el.gz
(defun rust-ts-mode--comment-docstring (node override start end &rest _args)
  "Use the comment or documentation face appropriately for comments."
  (let* ((beg (treesit-node-start node))
         (face (save-excursion
                 (goto-char beg)
                 (if (looking-at-p
                      "/\\(?:/\\(?:/[^/]\\|!\\)\\|\\*\\(?:\\*[^*/]\\|!\\)\\)")
                     'font-lock-doc-face
                   'font-lock-comment-face))))
    (treesit-fontify-with-override beg (treesit-node-end node)
                                   face override start end)))