Class: SyntaxTree::Bf::ShiftLeft
- Defined in:
- lib/syntax_tree/bf/nodes.rb
Overview
<
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location:) ⇒ ShiftLeft
constructor
A new instance of ShiftLeft.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ ShiftLeft
Returns a new instance of ShiftLeft.
136 137 138 |
# File 'lib/syntax_tree/bf/nodes.rb', line 136 def initialize(location:) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
134 135 136 |
# File 'lib/syntax_tree/bf/nodes.rb', line 134 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
140 141 142 |
# File 'lib/syntax_tree/bf/nodes.rb', line 140 def accept(visitor) visitor.visit_shift_left(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
144 145 146 |
# File 'lib/syntax_tree/bf/nodes.rb', line 144 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
150 151 152 |
# File 'lib/syntax_tree/bf/nodes.rb', line 150 def deconstruct_keys(keys) { value: "<", location: location } end |