Barbaric fault tolerance routine. Find
(vl-skip-through-endfunction &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-skip-through-endfunction-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-skip-through-endfunction)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-kwd-endfunction) (end := (vl-match)) (return end)) (:s= (vl-match-any)) (end := (vl-skip-through-endfunction)) (return end))))
Theorem:
(defthm vl-skip-through-endfunction-fails-gracefully (implies (mv-nth 0 (vl-skip-through-endfunction)) (not (mv-nth 1 (vl-skip-through-endfunction)))))
Theorem:
(defthm vl-warning-p-of-vl-skip-through-endfunction (iff (vl-warning-p (mv-nth 0 (vl-skip-through-endfunction))) (mv-nth 0 (vl-skip-through-endfunction))))
Theorem:
(defthm vl-skip-through-endfunction-result (implies (and t) (equal (vl-token-p (mv-nth 1 (vl-skip-through-endfunction))) (not (mv-nth 0 (vl-skip-through-endfunction))))))
Theorem:
(defthm vl-skip-through-endfunction-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-skip-through-endfunction))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-skip-through-endfunction))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-skip-through-endfunction))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))