Skip to content
On this page
class · Ruby 4.0

SyntaxSuggest::LexAll

< Object include Enumerable 4 instance methods 2 class methods

Ripper.lex is not guaranteed to lex the entire source document

This class guarantees the whole document is lex-ed by iteratively lexing the document where ripper stopped.

Prism likely doesn’t have the same problem. Once ripper support is removed we can likely reduce the complexity here if not remove the whole concept.

Example usage:

Example
lex = LexAll.new(source: source)
lex.each do |value|
  puts value.line
end

Class methods 2

Instance methods 4