Function: evil-ex-parse
evil-ex-parse is a byte-compiled function defined in evil-ex.el.
Signature
(evil-ex-parse &optional STRING SYNTAX ENTRYPOINT)
Documentation
Parse STRING as an Ex expression and return its evaluation tree.
If STRING is nil, parse the text after point instead. If SYNTAX is
non-nil, return a syntax tree instead. ENTRYPOINT is the start
symbol, which defaults to expression.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-ex.el
(defun evil-ex-parse (&optional string syntax entrypoint)
"Parse STRING as an Ex expression and return its evaluation tree.
If STRING is nil, parse the text after point instead. If SYNTAX is
non-nil, return a syntax tree instead. ENTRYPOINT is the start
symbol, which defaults to `expression'."
(if string
(with-temp-buffer
(insert string)
(goto-char (point-min))
(evil-ex-parse nil syntax entrypoint))
(let ((result (funcall (evil-parser evil-ex-grammar expression range)
(or entrypoint 'expression) syntax)))
(and result
;; Disallow incomplete matches (ignore trailing WS)
(not (search-forward "[^ \t\n\r]" nil t))
(car result)))))