Function: eglot--glob-parse
eglot--glob-parse is a byte-compiled function defined in eglot.el.gz.
Signature
(eglot--glob-parse GLOB)
Documentation
Compute list of (STATE-SYM EMITTER-FN PATTERN).
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
;;; Glob heroics
;;;
(defun eglot--glob-parse (glob)
"Compute list of (STATE-SYM EMITTER-FN PATTERN)."
(with-temp-buffer
(save-excursion (insert glob))
(cl-loop
with grammar = '((:** "\\*\\*/?" eglot--glob-emit-**)
(:* "\\*" eglot--glob-emit-*)
(:? "\\?" eglot--glob-emit-?)
(:{} "{[^][*{}]+}" eglot--glob-emit-{})
(:range "\\[\\^?[^][/,*{}]+\\]" eglot--glob-emit-range)
(:literal "[^][,*?{}]+" eglot--glob-emit-self))
until (eobp)
collect (cl-loop
for (_token regexp emitter) in grammar
thereis (and (re-search-forward (concat "\\=" regexp) nil t)
(list (cl-gensym "state-") emitter (match-string 0)))
finally (error "Glob '%s' invalid at %s" (buffer-string) (point))))))