Skip to content

Commit

Permalink
Fix steep errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Little-Rubyist committed Jul 16, 2024
1 parent b778966 commit 7a6eed3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/lrama/state/reduce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def add_not_selected_symbol(sym)

def selected_look_ahead
if @look_ahead
# @type ivar @look_ahead: Array<Grammar::Symbol>
@look_ahead - @not_selected_symbols
else
[]
Expand Down
2 changes: 1 addition & 1 deletion lib/lrama/state/resolved_conflict.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand Down

0 comments on commit 7a6eed3

Please sign in to comment.