class Prism::LexCompat::State
Pretty much a 1:1 copy of Ripper::Lexer::State. We list all the available states to reimplement to_s without using Ripper.
Constants
- ALL
-
Ripper-internal bitflags.
Private Instance Methods
Source
# File lib/prism/lex_compat.rb, line 248 def state_name(bits) ALL.filter_map { |flag, name| name if bits & flag != 0 }.join("|") end
Convert the state flags into the format exposed by ripper.