Class AtAttribute
User-defined @attribute attributes. Also includes @disable, @nogc,
@live, etc. by simply having them be regular identifiers.
Fields
| Name | Type | Description |
argumentList
|
ArgumentList | Set for all of @identifier(argumentList),
@templateInstance!T(argumentList) and @(argumentListInParens).
|
endLocation
|
ulong | |
identifier
|
TokenStructure!(ubyte,"import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;") | For @identifier, the identifier part.
Not set for @identifer!templateArgs, see templateInstance for that.
This is however set for @identifier(regularArguments).
|
startLocation
|
ulong | |
templateInstance
|
TemplateInstance | When there is at least one template argument (@id!T or @id!(T, U),
etc.), this is set instead of identifier.
For regular @identifier or @fn(args) UDAs without template arguments,
identifier is set instead.
|
templateSingleArgument
|
TemplateSingleArgument | For @int or @5, the part after the @. May only be a single token,
may not be identifier (see identifier for that).
Introduced with DMD 2.104.0
|
useParen
|
bool | True for @(argumentList) code, as well as
@templateInstance!T(argumentList) and @identifier(argumentList).
|
tokens
|
const(TokenStructure!(ubyte,"import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;"))[] | List of tokens consumed by this AST node
|
Methods
| Name | Description |
accept
(visitor)
|
|
token
()
|
Returns either identifier or templateSingleArgument,
whichever is set, otherwise Token.init.
|