(vl-parse-let-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-let-declaration-fn (atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-atts-p atts))) (let ((__function__ 'vl-parse-let-declaration)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-kwd-let)) (name := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-lparen) (:= (vl-match)) (ports := (vl-parse-0+-let-ports)) (:= (vl-match-token :vl-rparen))) (:= (vl-match-token :vl-equalsign)) (expr := (vl-parse-expression)) (return (make-vl-letdecl :name (vl-idtoken->name name) :portdecls ports :expr expr :atts atts :loc (vl-token->loc name))))))
Theorem:
(defthm vl-parse-let-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-let-declaration atts)) (not (mv-nth 1 (vl-parse-let-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-let-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-let-declaration atts))) (mv-nth 0 (vl-parse-let-declaration atts))))
Theorem:
(defthm vl-parse-let-declaration-result (implies (and (not (mv-nth 0 (vl-parse-let-declaration atts))) (and (force (vl-atts-p atts)))) (vl-letdecl-p (mv-nth 1 (vl-parse-let-declaration atts)))))
Theorem:
(defthm vl-parse-let-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-let-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-let-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-let-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))