class Crystal::Macros::Macro

Overview

A macro definition.

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance Method Detail

def args : ArrayLiteral(Arg) #

Returns the arguments of this macro.


[View source]
def block_arg : Arg | Nop #

Returns the block argument, if any.


[View source]
def body : ASTNode #

Returns the body of this macro.


[View source]
def double_splat : Arg | Nop #

Returns the double splat argument, if any.


[View source]
def name : MacroId #

Returns the name of this macro.


[View source]
def splat_index : NumberLiteral | NilLiteral #

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


[View source]
def visibility : SymbolLiteral #

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


[View source]