Class: Ibex::Runtime::CST::ReusableSubtree
- Inherits:
-
Object
- Object
- Ibex::Runtime::CST::ReusableSubtree
- Defined in:
- lib/ibex/runtime/cst/incremental/blender.rb,
sig/ibex/runtime/cst/incremental/blender.rbs
Overview
A Green nonterminal that can replace its old LR shift/reduce sequence.
Instance Attribute Summary collapse
- #green ⇒ GreenNode readonly
- #left_state ⇒ Integer readonly
- #left_states ⇒ Array[Integer?] readonly
- #lhs ⇒ Integer readonly
- #previous_trailing ⇒ Array[GreenTrivia] readonly
Instance Method Summary collapse
-
#initialize(green:, lhs:, left_state:, left_states:, previous_trailing:) ⇒ ReusableSubtree
constructor
A new instance of ReusableSubtree.
Constructor Details
#initialize(green:, lhs:, left_state:, left_states:, previous_trailing:) ⇒ ReusableSubtree
Returns a new instance of ReusableSubtree.
17 18 19 20 21 22 23 24 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 17 def initialize(green:, lhs:, left_state:, left_states:, previous_trailing:) @green = green @lhs = lhs @left_state = left_state @left_states = left_states.dup.freeze @previous_trailing = previous_trailing.dup.freeze freeze end |
Instance Attribute Details
#green ⇒ GreenNode (readonly)
9 10 11 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 9 def green @green end |
#left_state ⇒ Integer (readonly)
11 12 13 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 11 def left_state @left_state end |
#left_states ⇒ Array[Integer?] (readonly)
12 13 14 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 12 def left_states @left_states end |
#lhs ⇒ Integer (readonly)
10 11 12 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 10 def lhs @lhs end |
#previous_trailing ⇒ Array[GreenTrivia] (readonly)
13 14 15 |
# File 'lib/ibex/runtime/cst/incremental/blender.rb', line 13 def previous_trailing @previous_trailing end |