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)
Sourcenew(obj, name, arg : ASTNode)
Sourcenew(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)
SourceClass methods
global(name, arg1 : ASTNode, arg2 : ASTNode)
Sourceglobal(name, arg : ASTNode)
SourceInstance methods
==(other : self)
Returns true if this reference is the same as other. Invokes same?.
accept_children(visitor)
Sourceargs
Sourceblock
Sourceblock=(block : Block | Nil)
Sourceblock_arg
Sourceblock_arg=(block_arg : ASTNode | Nil)
Sourceclone_without_location
Sourcedoc
Returns the doc comment attached to this node. Not every node
supports having doc comments, so by default this returns nil.
expansion?
Sourceglobal?
Sourcehas_parentheses?
Sourcehash(hasher)
See Object#hash(hasher)
name
Sourcename_end_location
Sourcename_location
Sourcename_location=(name_location : Location | Nil)
Sourcename_size
Sourcenamed_args
Sourceobj
Sourceobj=(obj : ASTNode | Nil)
Sourcevisibility
Sourcevisibility=(visibility : Syntax::Visibility)
Source