Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Ruby::Prism.lex_compat
lex_compat(source, **options) → LexCompat::Result
lib/ruby/prism.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/ruby/prism.rb, line 74
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.
For supported options, see Ruby::Prism.parse.
: (String source, **untyped options) -> LexCompat::Result