class method
Prism.lex_compat
Prism::lex_compat(source, **options) → LexCompat::Result
lib/prism.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism.rb, line 68
def self.lex_compat(source, **options)
LexCompat.new(source, **options).result # steep:ignore
end
Returns a parse result whose value is an array of tokens that closely resembles the return value of Ripper::lex. The main difference is that the :on_sp token is not emitted.
For supported options, see Prism::parse.