class Ameba::AST::Assignment

Overview

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

Defined in:

ameba/ast/variabling/assignment.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(node : Crystal::ASTNode, variable : Ameba::AST::Variable, scope : Ameba::AST::Scope) #

Creates a new assignment.

Assignment.new(node, variable, scope)

[View source]

Instance Method Detail

def end_location(*args, **options) #

[View source]
def end_location(*args, **options, &) #

[View source]
def location(*args, **options) #

[View source]
def location(*args, **options, &) #

[View source]
def node : Crystal::ASTNode #

The actual assignment node.


[View source]
def op_assign? #

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

a ||= 1

[View source]
def scope : Scope #

A scope assignment belongs to


[View source]
def target_node #

Returns the target node of the variable in this assignment.


[View source]
def to_s(*args, **options) #

[View source]
def to_s(*args, **options, &) #

[View source]
def variable : Variable #

Variable of this assignment.


[View source]