instance method
SyntaxSuggest::LeftRightLexCount#missing_keyword_end
missing_keyword_end
lib/syntax_suggest/left_right_lex_count.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/syntax_suggest/left_right_lex_count.rb, line 148
def missing_keyword_end
case @kw_count <=> @end_count
when 1
"end"
when 0
nil
when -1
"keyword"
end
end
Keywords need ends and ends need keywords
If we have more keywords, there’s a missing end if we have more end-s, there’s a missing keyword