Case macro for the different kinds of vl-propexpr 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-propexpr structure, or to split into cases based on its type.
In its short form,
(vl-propexpr-case x :vl-propcore)
is essentially just a safer alternative to writing:
(equal (vl-propexpr-kind x) :vl-propcore)
Why is using vl-propexpr-case safer? When we directly inspect the
kind with
In its longer form,
(vl-propexpr-case x :vl-propcore ... :vl-propinst ... :vl-propthen ... :vl-proprepeat ... :vl-propassign ... :vl-propthroughout ... :vl-propclock ... :vl-propunary ... :vl-propbinary ... :vl-propalways ... :vl-propeventually ... :vl-propaccept ... :vl-propnexttime ... :vl-propif ... :vl-propcase ...)
It is also possible to consolidate ``uninteresting'' cases using
For convenience, the case macro automatically binds the fields of