Function: tuareg--pattern-maybe-type-matcher

tuareg--pattern-maybe-type-matcher is a natively compiled function defined in tuareg.el.

Signature

(tuareg--pattern-maybe-type-matcher LIMIT)

Documentation

Match a possible type after a let binding.

Run only once.

Source Code

;; Defined in /nix/store/6mbh851dhnag8f92qfrlh9ckldzwf6c6-emacs-packages-deps/share/emacs/site-lisp/elpa/tuareg-20260626.936/tuareg.el
(defun tuareg--pattern-maybe-type-matcher (limit)
  "Match a possible type after a let binding.
Run only once."
  ;; This function is needed because we want to ensure that the search
  ;; is bounded by the detected "=".
  (when (and (<= (point) tuareg--pattern-matcher-type-limit)
             (re-search-forward "[ \t\n]*:\\([^=]+\\)="
                                tuareg--pattern-matcher-type-limit t))
    (goto-char limit) ; Do not run a second time
    t))