instance method
SyntaxSuggest::AroundBlockScan#stop_after_kw
stop_after_kw
lib/syntax_suggest/around_block_scan.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/syntax_suggest/around_block_scan.rb, line 73
def stop_after_kw
@stop_after_kw = true
self
end
Tells scan_while to look for mismatched keyword/end-s
When scanning up, if we see more keywords then end-s it will stop. This might happen when scanning outside of a method body. the first scan line up would be a keyword and this setting would trigger a stop.
When scanning down, stop if there are more end-s than keywords.