diff --git a/lib/lrama/state/reduce.rb b/lib/lrama/state/reduce.rb index 45d509f7..a2b7c26c 100644 --- a/lib/lrama/state/reduce.rb +++ b/lib/lrama/state/reduce.rb @@ -27,6 +27,7 @@ def add_not_selected_symbol(sym) def selected_look_ahead if @look_ahead + # @type ivar @look_ahead: Array @look_ahead - @not_selected_symbols else [] diff --git a/lib/lrama/state/resolved_conflict.rb b/lib/lrama/state/resolved_conflict.rb index 6b67f36b..3bb3d144 100644 --- a/lib/lrama/state/resolved_conflict.rb +++ b/lib/lrama/state/resolved_conflict.rb @@ -8,7 +8,7 @@ class State class ResolvedConflict < Struct.new(:symbol, :reduce, :which, :same_prec, keyword_init: true) def report_message s = symbol.display_name - r = reduce.rule.precedence_sym.display_name + r = reduce.rule.precedence_sym&.display_name case when which == :shift && same_prec msg = "resolved as #{which} (%right #{s})"