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

ammonite.compiler.tools.desugar.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-M0-67-83057fea
Show newest version
package ammonite.compiler.tools

import sourcecode.Compat._
import scala.language.experimental.macros


class Desugared(s: String){
  override def toString() = s
}
object desugar{
  def transformer(c: Context)(expr: c.Expr[Any]): c.Expr[Desugared] = {
    import c.universe._
    c.Expr[Desugared](
      q"ammonite.compiler.tools.SourceRuntime.desugarImpl(${c.universe.showCode(expr.tree)})"
    )
  }

  def apply(expr: Any): Desugared = macro transformer
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy