Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Prism.lex_ripper
Prism::lex_ripper(source) → Array
lib/prism.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/prism.rb, line 56
def self.lex_ripper(source)
LexRipper.new(source).result
end
This lexes with the Ripper lex. It drops any space events but otherwise returns the same tokens. Raises SyntaxError if the syntax in source is invalid.