class

Syntax::Call

Inherits Syntax::ASTNode < Reference < Object

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.

Constructors

new(obj, name, arg1 : ASTNode, arg2 : ASTNode)
Source
new(obj, name, arg : ASTNode)
Source
new(obj : Syntax::ASTNode | Nil, name : String, args : Array(Syntax::ASTNode) = [] of ASTNode, block : Nil | Syntax::Block = nil, block_arg : Syntax::ASTNode | Nil = nil, named_args : Nil | Array(Syntax::NamedArgument) = nil, global : Bool = false)
Source

Class methods

global(name, arg1 : ASTNode, arg2 : ASTNode)
Source
global(name, arg : ASTNode)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

accept_children(visitor)
Source
args
Source
args=(args : Array(ASTNode))
Source
block
Source
block=(block : Block | Nil)
Source
block_arg
Source
block_arg=(block_arg : ASTNode | Nil)
Source
clone_without_location
Source
doc

Returns the doc comment attached to this node. Not every node supports having doc comments, so by default this returns nil.

Source
doc=(doc : String | Nil)
Source
expansion=(expansion : Bool)
Source
expansion?
Source
global=(global : Bool)
Source
global?
Source
has_parentheses=(has_parentheses : Bool)
Source
has_parentheses?
Source
hash(hasher)

See Object#hash(hasher)

name
Source
name=(name : String)
Source
name_end_location
Source
name_location
Source
name_location=(name_location : Location | Nil)
Source
name_size
Source
name_size=(name_size : Int32)
Source
named_args
Source
named_args=(named_args : Array(NamedArgument) | Nil)
Source
obj=(obj : ASTNode | Nil)
Source
visibility
Source
visibility=(visibility : Syntax::Visibility)
Source