Class: SyntaxTree::Bf::Decrement
- 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:) ⇒ Decrement
constructor
A new instance of Decrement.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ Decrement
Returns a new instance of Decrement.
90 91 92 |
# File 'lib/syntax_tree/bf/nodes.rb', line 90 def initialize(location:) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
88 89 90 |
# File 'lib/syntax_tree/bf/nodes.rb', line 88 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
94 95 96 |
# File 'lib/syntax_tree/bf/nodes.rb', line 94 def accept(visitor) visitor.visit_decrement(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
98 99 100 |
# File 'lib/syntax_tree/bf/nodes.rb', line 98 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
104 105 106 |
# File 'lib/syntax_tree/bf/nodes.rb', line 104 def deconstruct_keys(keys) { value: "-", location: location } end |