instance method
Prism::Translation::Ripper#void_stmt?
void_stmt?(left, right, allow_newline)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 3311
def void_stmt?(left, right, allow_newline)
pattern = allow_newline ? /[;\n]/ : /;/
source.byteslice(left.end_offset...right.start_offset).match?(pattern)
end
Returns true if there is a semicolon between the two locations.