GenField¶
Import: import system.codegen;
GenField¶
A field of a class, struct or union variant.
id¶
Identity of this model node; pass it to GenContext.error_at to report a diagnostic here.
name¶
Field name as declared.
ty¶
Declared type of the field.
visibility¶
Declared access level of this symbol.
attributes¶
Attributes attached to this declaration.
location¶
Where the field is written in source.
constructor¶
Creates a GenField from its parts. Generators normally receive these from GenContext rather than constructing them.
public constructor(
id: string,
name: string,
ty: GenTypeRef,
visibility: string,
attributes: List<GenAttribute>,
location: GenLocation
)
attribute¶
The first @A on this field, decoded into the attribute struct.
attributes_of¶
Decodes every attached attribute of the requested type.
has¶
Whether this field carries at least one @A attribute.