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