class Crystal::Macro
inherits Crystal::ASTNode
¶
Included modules
Crystal::Annotatable
Class methods¶
.new(name, args = [] of Arg, body = Nop.new, block_arg = nil, splat_index = nil, double_splat = nil)
¶
(name, args = [] of Arg, body = Nop.new, block_arg = nil, splat_index = nil, double_splat = 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?)
#match
¶
Yields arg, arg_index, object, object_index
corresponding
to arguments matching the given objects, taking into account this
macro's splat index.