Function: tuareg--font-lock-in-string-or-comment

tuareg--font-lock-in-string-or-comment is a natively compiled function defined in tuareg.el.

Signature

(tuareg--font-lock-in-string-or-comment)

Documentation

Returns t if the point is inside a string or a comment.

This based on the fontification and is faster than calling syntax-ppss. It must not be used outside fontification purposes.

Source Code

;; Defined in /nix/store/6mbh851dhnag8f92qfrlh9ckldzwf6c6-emacs-packages-deps/share/emacs/site-lisp/elpa/tuareg-20260626.936/tuareg.el
(defun tuareg--font-lock-in-string-or-comment ()
  "Returns t if the point is inside a string or a comment.
This based on the fontification and is faster than calling `syntax-ppss'.
It must not be used outside fontification purposes."
  (let* ((face (get-text-property (point) 'face)))
    (and (symbolp face)
         (memq face '(font-lock-comment-face
                      font-lock-comment-delimiter-face
                      font-lock-doc-face
                      tuareg-font-lock-doc-markup-face
                      tuareg-font-lock-doc-verbatim-face
                      font-lock-string-face)))))