Class: Ikra::AST::IVarReadNode
- Defined in:
- lib/ast/nodes.rb,
lib/ast/visitor.rb
Constant Summary
Constants inherited from TreeNode
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #clone ⇒ Object
-
#initialize(identifier:) ⇒ IVarReadNode
constructor
A new instance of IVarReadNode.
Methods inherited from TreeNode
#==, #enclosing_class, #find_behavior_node, #get_type, #is_begin_node?, #merge_union_type, #register_type_change, #replace, #replace_child, #symbol_table
Methods inherited from Node
Constructor Details
#initialize(identifier:) ⇒ IVarReadNode
Returns a new instance of IVarReadNode.
364 365 366 |
# File 'lib/ast/nodes.rb', line 364 def initialize(identifier:) @identifier = identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
362 363 364 |
# File 'lib/ast/nodes.rb', line 362 def identifier @identifier end |
Instance Method Details
#accept(visitor) ⇒ Object
86 87 88 |
# File 'lib/ast/visitor.rb', line 86 def accept(visitor) visitor.visit_ivar_read_node(self) end |
#clone ⇒ Object
368 369 370 |
# File 'lib/ast/nodes.rb', line 368 def clone return IVarReadNode.new(identifier: @identifier) end |