class Crystal::Arg
inherits Crystal::ASTNode
¶
A def argument.
Included modules
Crystal::SpecialVar
Class methods¶
.new(name : String, default_value : ASTNode? = nil, restriction : ASTNode? = nil, external_name : String? = nil, type : Type? = nil)
¶
(name : String, default_value : ASTNode? = nil, restriction : ASTNode? = nil, external_name : String? = nil, type : Type? = nil)
Methods¶
#==(other : self)
¶
(other : self)
Returns true
if this reference is the same as other. Invokes same?
.
#doc : String?
¶
: String?
Returns the doc comment attached to this node. Not every node
supports having doc comments, so by default this returns nil
.
#hash(hasher)
¶
(hasher)
#interpret(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)
¶
(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)