class Crystal::Macros::Arg

Overview

A def argument.

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance Method Detail

def default_value : ASTNode | NopSource

Returns the default value of this argument, if any.

def internal_name : MacroIdSource

Returns the internal name of this argument.

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

def name : MacroIdSource

Returns the external name of this argument.

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

def restriction : ASTNode | NopSource

Returns the type restriction of this argument, if any.

© 2012–2021 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.2.1/Crystal/Macros/Arg.html