class

Syntax::Arg

Inherits Syntax::SpecialVar < Syntax::ASTNode < Reference < Object

A def argument.

Constructors

new(name : String, default_value : ASTNode | Nil = nil, restriction : ASTNode | Nil = nil, external_name : String | Nil = nil)
Source

Instance methods

==(other : self)

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

accept_children(visitor)
Source
clone_without_location
Source
default_value
Source
default_value=(default_value : ASTNode | Nil)
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
external_name
Source
external_name=(external_name : String)
Source
hash(hasher)

See Object#hash(hasher)

name

The internal name

Source
name=(name : String)

The internal name

Source
name_size
Source
restriction
Source
restriction=(restriction : ASTNode | Nil)
Source