Skip to content

class Crystal::Macros::Arg
inherits Crystal::Macros::ASTNode

A def argument.

Methods

#default_value : ASTNode | Nop

Returns the default value of this argument, if any.

View source

#internal_name : MacroId

Returns the internal name of this argument.

For example, for def write(to file) returns file.

View source

#name : MacroId

Returns the external name of this argument.

For example, for def write(to file) returns to.

View source

#restriction : ASTNode | Nop

Returns the type restriction of this argument, if any.

View source