Class: Rubinius::ToolSet.current::TS::AST::LeftPatternVariable
- Includes:
- LocalVariable
- Defined in:
- lib/rubinius/ast/variables.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes included from LocalVariable
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, name) ⇒ LeftPatternVariable
constructor
A new instance of LeftPatternVariable.
- #position_bytecode(g) ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, name) ⇒ LeftPatternVariable
Returns a new instance of LeftPatternVariable.
750 751 752 753 754 |
# File 'lib/rubinius/ast/variables.rb', line 750 def initialize(line, name) @line = line @name = name @variable = nil end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
748 749 750 |
# File 'lib/rubinius/ast/variables.rb', line 748 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
748 749 750 |
# File 'lib/rubinius/ast/variables.rb', line 748 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/rubinius/ast/variables.rb', line 761 def bytecode(g) pos(g) unless @variable g.state.scope.assign_local_reference self end g.shift_array @variable.set_bytecode(g) g.pop end |
#position_bytecode(g) ⇒ Object
756 757 758 759 |
# File 'lib/rubinius/ast/variables.rb', line 756 def position_bytecode(g) @variable.get_bytecode(g) g.cast_array end |