Skip to content

class Crystal::Macros::Annotation
inherits Crystal::Macros::ASTNode

An annotation on top of a type or variable.

Methods

#[](index : NumberLiteral) : ASTNode

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

View source

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

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

View source

#args : TupleLiteral

Returns a TupleLiteral representing the positional arguments on self.

View source

#named_args : NamedTupleLiteral

Returns a NamedTupleLiteral representing the named arguments on self.

View source