class Prism::Translation::Parser::Lexer

def parse_complex(value)

Parse a complex from the string representation.
def parse_complex(value)
  value.chomp!("i")
  if value.end_with?("r")
    Complex(0, parse_rational(value))
  elsif value.start_with?(/0[BbOoDdXx]/)
    Complex(0, parse_integer(value))
  else
    Complex(0, value)
  end
rescue ArgumentError
  0i
end