On this page
class · Ruby 4.0
SyntaxSuggest::LexAll
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