Class: Ibex::Runtime::CST::ReusableSubtree
- Inherits:
-
Object
- Object
- Ibex::Runtime::CST::ReusableSubtree
- Defined in:
- lib/json5/generated_parser.rb
Overview
A Green nonterminal that can replace its old LR shift/reduce sequence.
Instance Attribute Summary collapse
- #green ⇒ Object readonly
- #left_state ⇒ Object readonly
- #left_states ⇒ Object readonly
- #lhs ⇒ Object readonly
- #previous_trailing ⇒ Object 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.
3058 3059 3060 3061 3062 3063 3064 3065 |
# File 'lib/json5/generated_parser.rb', line 3058 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 ⇒ Object (readonly)
3050 3051 3052 |
# File 'lib/json5/generated_parser.rb', line 3050 def green @green end |
#left_state ⇒ Object (readonly)
3052 3053 3054 |
# File 'lib/json5/generated_parser.rb', line 3052 def left_state @left_state end |
#left_states ⇒ Object (readonly)
3053 3054 3055 |
# File 'lib/json5/generated_parser.rb', line 3053 def left_states @left_states end |
#lhs ⇒ Object (readonly)
3051 3052 3053 |
# File 'lib/json5/generated_parser.rb', line 3051 def lhs @lhs end |
#previous_trailing ⇒ Object (readonly)
3054 3055 3056 |
# File 'lib/json5/generated_parser.rb', line 3054 def previous_trailing @previous_trailing end |