class Crystal::Macros::Annotation
Overview
An annotation on top of a type or variable.
Defined in:
compiler/crystal/macros.crInstance Method Summary
-
#[](index : NumberLiteral) : ASTNode
Returns the value of a positional argument, or NilLiteral if out of bounds.
-
#[](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
Returns a
TupleLiteral
representing the positional arguments onself
. -
#name : Path
Returns the name of this annotation.
-
#named_args : NamedTupleLiteral
Returns a
NamedTupleLiteral
representing the named arguments onself
.
Instance Method Detail
Returns the value of a positional argument, or NilLiteral if out of bounds.
Returns the value of a named argument,
or NilLiteral if the named argument isn't
used on self
.
def named_args : NamedTupleLiteral
#
Returns a NamedTupleLiteral
representing the named arguments on self
.