private def pprint()

in scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala [219:263]


  private def pprint(info: s.SymbolInformation): Unit = {
    if (info.isMethod && info.displayName.endsWith("_=")) return
    symbols.append(info)
    rep(info.annotations, " ", " ")(pprint)
    if (info.isCovariant) str("+")
    if (info.isContravariant) str("-")
    if (info.isMethod && info.isVal) str("val ")
    else if (info.isMethod && info.isVar) str("var ")
    else if (info.isMethod) str("def ")
    else if (info.isType) str("type ")
    else if (info.isParameter) str("")
    else if (info.isTypeParameter) str("")
    else sys.error(s"unsupported info: ${info.toProtoString}")
    pprint(info.symbol)
    info.signature match {
      case s.MethodSignature(tparams, paramss, res) =>
        rep("[", tparams.infos, ", ", "]")(pprint)
        rep("(", paramss, ")(", ")") { params =>
          if (params.infos.exists(_.isImplicit)) str("implicit ")
          rep(params.infos, ", ")(pprint)
        }
        opt(": ", res)(pprint)
      case s.TypeSignature(tparams, lo, hi) =>
        rep("[", tparams.infos, ", ", "]")(pprint)
        if (lo != hi) {
          lo match {
            case s.TypeRef(s.NoType, "scala/Nothing#", Nil) => ()
            case lo => opt(" >: ", lo)(pprint)
          }
          hi match {
            case s.TypeRef(s.NoType, "scala/Any#", Nil) => ()
            case hi => opt(" <: ", hi)(pprint)
          }
        } else {
          val alias = lo
          opt(" = ", alias)(pprint)
        }
      case s.ValueSignature(tpe) =>
        str(": ")
        pprint(tpe)
      case other =>
        val details = other.asMessage.toProtoString
        sys.error(s"unsupported signature: $details")
    }
  }