Class: Lrama::State::Action::Shift
- Inherits:
-
Object
- Object
- Lrama::State::Action::Shift
- Defined in:
- lib/lrama/state/action/shift.rb
Instance Attribute Summary collapse
-
#from_state ⇒ Object
readonly
TODO: rbs-inline 0.11.0 doesn't support instance variables.
-
#next_sym ⇒ Object
readonly
: Grammar::Symbol.
-
#not_selected ⇒ Object
: bool.
-
#to_items ⇒ Object
readonly
: Array.
-
#to_state ⇒ Object
readonly
: State.
Instance Method Summary collapse
- #clear_conflicts ⇒ Object
-
#initialize(from_state, next_sym, to_items, to_state) ⇒ Shift
constructor
A new instance of Shift.
Constructor Details
#initialize(from_state, next_sym, to_items, to_state) ⇒ Shift
Returns a new instance of Shift.
25 26 27 28 29 30 |
# File 'lib/lrama/state/action/shift.rb', line 25 def initialize(from_state, next_sym, to_items, to_state) @from_state = from_state @next_sym = next_sym @to_items = to_items @to_state = to_state end |
Instance Attribute Details
#from_state ⇒ Object (readonly)
TODO: rbs-inline 0.11.0 doesn't support instance variables. Move these type declarations above instance variable definitions, once it's supported. see: https://github.com/soutaro/rbs-inline/pull/149
@rbs! @from_state: State @next_sym: Grammar::Symbol @to_items: Array @to_state: State
18 19 20 |
# File 'lib/lrama/state/action/shift.rb', line 18 def from_state @from_state end |
#next_sym ⇒ Object (readonly)
: Grammar::Symbol
19 20 21 |
# File 'lib/lrama/state/action/shift.rb', line 19 def next_sym @next_sym end |
#not_selected ⇒ Object
: bool
22 23 24 |
# File 'lib/lrama/state/action/shift.rb', line 22 def not_selected @not_selected end |
#to_items ⇒ Object (readonly)
: Array
20 21 22 |
# File 'lib/lrama/state/action/shift.rb', line 20 def to_items @to_items end |
#to_state ⇒ Object (readonly)
: State
21 22 23 |
# File 'lib/lrama/state/action/shift.rb', line 21 def to_state @to_state end |
Instance Method Details
#clear_conflicts ⇒ Object
33 34 35 |
# File 'lib/lrama/state/action/shift.rb', line 33 def clear_conflicts @not_selected = nil end |