class
Ameba::AST::Assignment
- Ameba::AST::Assignment
- Reference
- Object
Overview
Represents the assignment to the variable. Holds the assign node and the variable.
Defined in:
ameba/ast/variabling/assignment.crConstructors
-
.new(node : Crystal::ASTNode, variable : Ameba::AST::Variable, scope : Ameba::AST::Scope)
Creates a new assignment.
Instance Method Summary
- #end_location(*args, **options)
- #end_location(*args, **options, &)
- #location(*args, **options)
- #location(*args, **options, &)
-
#node : Crystal::ASTNode
The actual assignment node.
-
#op_assign?
Returns
trueif this assignment is an op assign,falseif not. -
#scope : Scope
A scope assignment belongs to
-
#target_node
Returns the target node of the variable in this assignment.
- #to_s(*args, **options)
- #to_s(*args, **options, &)
-
#variable : Variable
Variable of this assignment.
Constructor Detail
Creates a new assignment.
Assignment.new(node, variable, scope)
Instance Method Detail
def op_assign?
#
Returns true if this assignment is an op assign, false if not.
For example, this is an op assign:
a ||= 1