class

Ameba::AST::Assignment

Inherits Reference < Object

Represents the assignment to the variable. Holds the assign node and the variable.

Constructors

new(node : Crystal::ASTNode, variable : Ameba::AST::Variable, scope : Ameba::AST::Scope)

Creates a new assignment.

Assignment.new(node, variable, scope)
Source

Instance methods

end_location(*args, **options)
Source
end_location(*args, **options, &)
Source
location(*args, **options)
Source
location(*args, **options, &)
Source
node

The actual assignment node.

Source
op_assign?

Returns true if this assignment is an op assign, false if not. For example, this is an op assign:

a ||= 1
Source
scope

A scope assignment belongs to

Source
target_node

Returns the target node of the variable in this assignment.

Source
to_s(*args, **options)
Source
to_s(*args, **options, &)
Source
variable

Variable of this assignment.

Source