class Prism::Translation::Parser::Lexer

def parse_rational(value)

Parse a rational from the string representation.
def parse_rational(value)
  value.chomp!("r")
  if value.start_with?(/0[BbOoDdXx]/)
    Rational(parse_integer(value))
  else
    Rational(value)
  end
rescue ArgumentError
  0r
end