Skip to content

class Crystal::ArrayLiteral
inherits Crystal::ASTNode

An array literal.

'[' [ expression [ ',' expression ]* ] ']'

Included modules

Crystal::ExpandableNode

Class methods

.map(values, of = nil

View source

.map_with_index

View source

.new(elements = [] of ASTNode, of = nil, name = nil)

View source

Methods

#==(other : self)

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

#accept_children(visitor)

View source

#clone_without_location

View source

#elements : Array(ASTNode)

View source

#elements=(elements : Array(ASTNode))

View source

#hash(hasher)

#interpret(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)

View source

#name=(name : ASTNode?)

View source

#of=(of : ASTNode?)

View source