Function: eieio--pcase-macroexpander

eieio--pcase-macroexpander is a function defined in eieio.el.gz.

Signature

(eieio--pcase-macroexpander &rest FIELDS)

Documentation

Pcase patterns that match EIEIO object EXPVAL.

Elements of FIELDS can be of the form (NAME PAT) in which case the contents of field NAME is matched against PAT, or they can be of
 the form NAME which is a shorthand for (NAME NAME).

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio.el.gz
;; Could not find source code, showing raw function object.
#[(&rest fields)
  (`(and (pred eieio-object-p) ,@
	 (mapcar
	  (lambda (field)
	    (pcase-exhaustive field
	      (`(,name ,pat) `(app (eieio-oref _ ',name) ,pat))
	      ((pred symbolp) `(app (eieio-oref _ ',field) ,field))))
	  fields)))
  (t) nil
  "Pcase patterns that match EIEIO object EXPVAL.\nElements of FIELDS can be of the form (NAME PAT) in which case the\ncontents of field NAME is matched against PAT, or they can be of\n the form NAME which is a shorthand for (NAME NAME)."]