Case macro for the different kinds of vl-stmt structures.
This is an fty sum-type case macro, typically introduced by defflexsum or deftagsum. It allows you to safely check the type of a vl-stmt structure, or to split into cases based on its type.
In its short form,
(vl-stmt-case x :vl-nullstmt)
is essentially just a safer alternative to writing:
(equal (vl-stmt-kind x) :vl-nullstmt)
Why is using vl-stmt-case safer? When we directly inspect the
kind with
In its longer form,
(vl-stmt-case x :vl-nullstmt ... :vl-assignstmt ... :vl-deassignstmt ... :vl-callstmt ... :vl-disablestmt ... :vl-eventtriggerstmt ... :vl-casestmt ... :vl-ifstmt ... :vl-foreverstmt ... :vl-waitstmt ... :vl-repeatstmt ... :vl-whilestmt ... :vl-dostmt ... :vl-forstmt ... :vl-foreachstmt ... :vl-breakstmt ... :vl-continuestmt ... :vl-blockstmt ... :vl-timingstmt ... :vl-returnstmt ... :vl-assertstmt ... :vl-cassertstmt ...)
It is also possible to consolidate ``uninteresting'' cases using
For convenience, the case macro automatically binds the fields of