All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.meta.prettyprinters.Api.scala Maven / Gradle / Ivy

Go to download

Bag of private and public helpers used in scala.meta's APIs and implementations

There is a newer version: 4.12.2
Show newest version
package scala.meta
package prettyprinters

import scala.language.higherKinds

private[meta] trait Api {
  implicit class XtensionShow[T](x: T) {
    def show[Style[X] <: Show[X]](implicit style: Style[T]): String = style(x).toString
  }
  implicit class XtensionSyntax[T](x: T)(implicit style: Syntax[T]) {
    def syntax: String = style(x).toString
  }
  implicit class XtensionStructure[T](x: T)(implicit style: Structure[T]) {
    def structure: String = style(x).toString
  }
}

private[meta] trait Aliases {
  type Structure[T] = scala.meta.prettyprinters.Structure[T]
  // there's no term Structure, so we don't have a term alias here

  type Syntax[T] = scala.meta.prettyprinters.Syntax[T]
  // there's no term Syntax, so we don't have a term alias here
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy