class

Syntax::FunDef

Inherits Syntax::ASTNode < Reference < Object

Constructors

new(name : String, args : Array(Syntax::Arg) = [] of Arg, return_type : Syntax::ASTNode | Nil = nil, varargs : Bool = false, body : Syntax::ASTNode | Nil = nil, real_name : String = name)
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(Arg))
Source
body
Source
body=(body : 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
hash(hasher)

See Object#hash(hasher)

name
Source
name=(name : String)
Source
real_name
Source
real_name=(real_name : String)
Source
return_type
Source
return_type=(return_type : ASTNode | Nil)
Source
varargs=(varargs : Bool)
Source
varargs?
Source