Compatible with seq. If we are at the first token on a line, return its column number. Otherwise return NIL.
(vl-linestart-indent &key (tokstream 'tokstream)) → (mv errmsg startcol new-tokstream)
Function:
(defun vl-linestart-indent-fn (tokstream) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard t)) (let ((__function__ 'vl-linestart-indent)) (declare (ignorable __function__)) (b* ((tokens (vl-tokstream->tokens)) ((unless (and (consp tokens) (vl-token->breakp (car tokens)))) (mv nil nil tokstream)) (echar1 (car (vl-token->etext (car tokens)))) (col1 (vl-echarpack->col (vl-echar-raw->pack echar1)))) (mv nil col1 tokstream))))
Theorem:
(defthm not-of-vl-linestart-indent.errmsg (b* (((mv ?errmsg ?startcol ?new-tokstream) (vl-linestart-indent-fn tokstream))) (not errmsg)) :rule-classes :rewrite)
Theorem:
(defthm maybe-natp-of-vl-linestart-indent.startcol (b* (((mv ?errmsg ?startcol ?new-tokstream) (vl-linestart-indent-fn tokstream))) (maybe-natp startcol)) :rule-classes :type-prescription)
Theorem:
(defthm return-type-of-vl-linestart-indent.new-tokstream (b* (((mv ?errmsg ?startcol ?new-tokstream) (vl-linestart-indent-fn tokstream))) (equal new-tokstream tokstream)) :rule-classes :rewrite)