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