Class: Lrama::State::Action::Goto

Inherits:
Object
  • Object
show all
Defined in:
lib/lrama/state/action/goto.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_state, next_sym, to_items, to_state) ⇒ Goto

Returns a new instance of Goto.



24
25
26
27
28
29
# File 'lib/lrama/state/action/goto.rb', line 24

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_stateObject (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/goto.rb', line 18

def from_state
  @from_state
end

#next_symObject (readonly)

: Grammar::Symbol



19
20
21
# File 'lib/lrama/state/action/goto.rb', line 19

def next_sym
  @next_sym
end

#to_itemsObject (readonly)

: Array



20
21
22
# File 'lib/lrama/state/action/goto.rb', line 20

def to_items
  @to_items
end

#to_stateObject (readonly)

: State



21
22
23
# File 'lib/lrama/state/action/goto.rb', line 21

def to_state
  @to_state
end