class Crystal::Macros::Annotation
inherits Crystal::Macros::ASTNode
¶
An annotation on top of a type or variable.
Methods¶
#[](index : NumberLiteral) : ASTNode
¶
(index : NumberLiteral) : ASTNode
Returns the value of a positional argument, or NilLiteral if out of bounds.
#[](name : SymbolLiteral | StringLiteral | MacroId) : ASTNode
¶
(name : SymbolLiteral | StringLiteral | MacroId) : ASTNode
Returns the value of a named argument,
or NilLiteral if the named argument isn't
used on self
.
#args : TupleLiteral
¶
: TupleLiteral
Returns a TupleLiteral
representing the positional arguments on self
.
#named_args : NamedTupleLiteral
¶
: NamedTupleLiteral
Returns a NamedTupleLiteral
representing the named arguments on self
.