Function: combobulate-query--iter-state-machine-+

combobulate-query--iter-state-machine-+ is a natively compiled function defined in combobulate-navigation.el.

Signature

(combobulate-query--iter-state-machine-+ STRICT)

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-navigation.el
(iter-defun combobulate-query--iter-state-machine-+ (strict)
  (while t
    (let ((loop t) (start) (found-matches 0))
      (setq start (iter-yield 'start))
      (while loop
        (pcase start
          ('reset (setq loop nil))
          ('match
           (cl-incf found-matches)
           (setq loop t)
           (setq start (iter-yield 'match-continue)))
          ('no-children
           (setq loop nil)
           (if (>= found-matches 1)
               (iter-yield 'match-stop)
             (iter-yield 'failed-match)))
          ('no-match
           (if (and (>= found-matches 1) strict)
               (progn
                 (setq loop nil)
                 (iter-yield 'match-stop))
             (setq loop t)
             (setq start (iter-yield 'continue))))
          (_ (error "Unknown transition `%s'" start)))))))