Vl-expr-replace-assignpatterns
Rewrite an expression to replace assignment patterns with concatenations.
- Signature
(vl-expr-replace-assignpatterns
lhs-type x in-pattern ss ctx warnings)
→
(mv successp new-x new-warnings)
- Arguments
- lhs-type — The type that we want x to assume.
Guard (vl-datatype-p lhs-type).
- x — The expression to size/type.
Guard (vl-expr-p x).
- in-pattern — True if we're inside an assignment pattern.
- ss — Identifier bindings.
Guard (vl-scopestack-p ss).
- ctx — Context for sizing error messages.
Guard (vl-context-p ctx).
- warnings — Ordinary warnings accumulator.
Guard (vl-warninglist-p warnings).
- Returns
- successp — Type (booleanp successp).
- new-x — Type (vl-expr-p new-x).
- new-warnings — Type (vl-warninglist-p new-warnings).
Important caveat: This is only correct for packed datatypes.