class

Crystal::Macros::Annotation

Inherits Crystal::Macros::ASTNode

An annotation on top of a type or variable.

Instance methods

[](index : NumberLiteral) : ASTNode

Returns the value of a positional argument, or NilLiteral if out of bounds.

Source
[](name : SymbolLiteral | StringLiteral | MacroId) : ASTNode

Returns the value of a named argument, or NilLiteral if the named argument isn't used on self.

Source
args

Returns a TupleLiteral representing the positional arguments on self.

Source
name

Returns the name of this annotation.

Source
named_args

Returns a NamedTupleLiteral representing the named arguments on self.

Source