GenVariant¶
Import: import system.codegen;
GenVariant¶
A choice declared by an enum or discriminated union.
id¶
Identity of this model node; pass it to GenContext.error_at to report a diagnostic here.
name¶
Variant name as declared.
fields¶
Fields of this type, in declaration order.
location¶
Where the variant is written in source.
constructor¶
Creates a GenVariant from its parts. Generators normally receive these from GenContext rather than constructing them.