Skip to content

class Crystal::Expressions
inherits Crystal::ASTNode

A container for one or many expressions.

Class methods

.from(obj : Nil)

View source

.from(obj : Array)

View source

.from(obj : ASTNode)

View source

.new(expressions = [] of ASTNode)

View source

Methods

#==(other : self)

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

#[](i)

View source

#accept_children(visitor)

View source

#clone_without_location

View source

#empty?

View source

#end_location

The location where this node ends, or nil if the location is not known.

View source

#expressions : Array(ASTNode)

View source

#expressions=(expressions : 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

#keyword : Symbol?

View source

#keyword=(keyword : Symbol?)

View source

#last

View source

#location

The location where this node starts, or nil if the location is not known.

View source

#single_expression?

It yields first node if this holds only one node, or yields nil.

View source