Skip to content

class Crystal::Macros::Macro
inherits Crystal::Macros::ASTNode

A macro definition.

Methods

#args : ArrayLiteral(Arg)

Returns the arguments of this macro.

View source

#block_arg : Arg | Nop

Returns the block argument, if any.

View source

#body : ASTNode

Returns the body of this macro.

View source

#double_splat : Arg | Nop

Returns the double splat argument, if any.

View source

#name : MacroId

Returns the name of this macro.

View source

#splat_index : NumberLiteral | NilLiteral

Returns the index of the argument with a *splat, if any.

View source

#visibility : SymbolLiteral

Returns the visibility of this macro: :public, :protected or :private.

View source