class Crystal::Call
inherits Crystal::ASTNode
¶
A method call.
[ obj '.' ] name '(' ')' [ block ]
| [ obj '.' ] name '(' arg [ ',' arg ] ')' [ block ] | [ obj '.' ] name arg [ ',' arg ] [ block ] | arg name arg
The last syntax is for infix operators, and name will be the symbol of that operator instead of a string.
Class methods¶
.new(obj, name, args = [] of ASTNode, block = nil, block_arg = nil, named_args = nil, global : Bool = false)
¶
(obj, name, args = [] of ASTNode, block = nil, block_arg = nil, named_args = nil, global : Bool = false)
Methods¶
#==(other : self)
¶
(other : self)
Returns true
if this reference is the same as other. Invokes same?
.
#append_error_when_no_matching_defs(owner, def_name, all_arguments_sizes, real_args_size, min_splat, defs, io)
¶
(owner, def_name, all_arguments_sizes, real_args_size, min_splat, defs, io)
#convert_numeric_argument(self_arg, unaliased_type, expected_type, actual_type, index)
¶
(self_arg, unaliased_type, expected_type, actual_type, index)
#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?)
#lookup_matches_checking_expansion(owner, signature, search_in_parents = true, with_literals = false)
¶
(owner, signature, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : Program, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : Program, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : AliasType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : AliasType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : UnionType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : UnionType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : FileModule, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : FileModule, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : NonGenericModuleType | GenericModuleInstanceType | GenericType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : NonGenericModuleType | GenericModuleInstanceType | GenericType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : LibType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : LibType, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in(owner : Type, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
¶
(owner : Type, arg_types, named_args_types, self_type = nil, def_name = self.name, search_in_parents = true, with_literals = false)
#lookup_matches_in_type(owner, arg_types, named_args_types, self_type, def_name, search_in_parents, search_in_toplevel = true, with_literals = false)
¶
(owner, arg_types, named_args_types, self_type, def_name, search_in_parents, search_in_toplevel = true, with_literals = false)
#lookup_matches_with_scope_in(owner, arg_types, named_args_types, with_literals = false)
¶
(owner, arg_types, named_args_types, with_literals = false)
#lookup_matches_with_signature(owner : Program, signature, search_in_parents, with_literals)
¶
(owner : Program, signature, search_in_parents, with_literals)
#match_block_arg(match)
¶
(match)
Match the given block with the given block argument specification (&block : A, B, C -> D)
#parent_visitor : MainVisitor
¶
: MainVisitor
#parent_visitor? : MainVisitor?
¶
: MainVisitor?
#prepare_typed_def_with_args(untyped_def, owner, self_type, arg_types, block_arg_type, named_args_types)
¶
(untyped_def, owner, self_type, arg_types, block_arg_type, named_args_types)
#raise_matches_not_found(owner, def_name, arg_types, named_args_types, matches = nil, with_literals = false)
¶
(owner, def_name, arg_types, named_args_types, matches = nil, with_literals = false)