Basic constructor macro for format-string structures.
(make-format-string [:elements <elements>])
This is the usual way to construct format-string structures. It simply conses together a structure with the specified fields.
This macro generates a new format-string structure from scratch. See also change-format-string, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-format-string (&rest args) (std::make-aggregate 'format-string args '((:elements)) 'make-format-string nil))
Function:
(defun format-string (elements) (declare (xargs :guard (char/container-listp elements))) (declare (xargs :guard (char/container-list-no-open/close-brace-p elements))) (let ((__function__ 'format-string)) (declare (ignorable __function__)) (b* ((elements (mbe :logic (char/container-list-fix elements) :exec elements))) (let ((elements (mbe :logic (if (char/container-list-no-open/close-brace-p elements) elements nil) :exec elements))) (cons :format-string (list (cons 'elements elements)))))))