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