Function: rust-ts-mode--fontify-scope

rust-ts-mode--fontify-scope is a byte-compiled function defined in rust-ts-mode.el.gz.

Signature

(rust-ts-mode--fontify-scope NODE OVERRIDE START END &optional TAIL-P)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/rust-ts-mode.el.gz
(defun rust-ts-mode--fontify-scope (node override start end &optional tail-p)
  (let* ((case-fold-search nil)
         (face
          (cond
           ((string-match-p "^[A-Z]" (treesit-node-text node))
            'font-lock-type-face)
           ((and
             tail-p
             (string-match-p
              "\\`\\(?:use_list\\|call_expression\\|use_as_clause\\|use_declaration\\)\\'"
              (treesit-node-type (treesit-node-parent (treesit-node-parent node)))))
            nil)
           (t 'font-lock-constant-face))))
    (when face
      (treesit-fontify-with-override
       (treesit-node-start node) (treesit-node-end node)
       face
       override start end))))