GenAttribute¶
Import: import system.codegen;
GenAttribute¶
One attribute use. Prefer the typed GenAttributes.decode<A>() (via attribute<A>() on a node); the positional readers below are what decoders are built from.
id¶
module::name of the @attribute type (system.json::JsonAttribute).
name¶
Unqualified attribute name as written, without the @ (json).
args¶
Arguments supplied to the attribute, in declaration order.
constructor¶
Creates a GenAttribute from its parts. Generators normally receive these from GenContext rather than constructing them.
string_arg¶
Argument i as unquoted text, or an empty string when there is no such argument.
int_arg¶
Argument i parsed as an int, or 0 when it is missing or not an integer.
long_arg¶
Argument i parsed as a long, or 0 when it is missing or not an integer.
double_arg¶
Argument i parsed as a double, or 0.0 when it is missing or not a number.
float_arg¶
Argument i parsed as a float, or 0.0 when it is missing or not a number.
bool_arg¶
Whether argument i is the literal true; missing arguments read as false.
enum_member¶
The member name of an enum argument (Get for HttpMethod.Get).