Basic constructor macro for tag-declon-union structures.
(make-tag-declon-union [:tag <tag>] [:members <members>])
This is the usual way to construct tag-declon-union structures. It simply conses together a structure with the specified fields.
This macro generates a new tag-declon-union structure from scratch. See also change-tag-declon-union, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-tag-declon-union (&rest args) (std::make-aggregate 'tag-declon-union args '((:tag) (:members)) 'make-tag-declon-union nil))
Function:
(defun tag-declon-union (tag members) (declare (xargs :guard (and (identp tag) (struct-declon-listp members)))) (declare (xargs :guard t)) (let ((__function__ 'tag-declon-union)) (declare (ignorable __function__)) (b* ((tag (mbe :logic (ident-fix tag) :exec tag)) (members (mbe :logic (struct-declon-list-fix members) :exec members))) (cons :union (list tag members)))))