blob: 6b73a9618457c53fccaca36ac115c263e2b436e3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import scala.reflect.macros.{BlackboxContext => Ctx}
object Impls {
def foo_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.universe._
c.Expr(q"$x + 1")
}
def bar_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.universe._
c.Expr(q"$x + 2")
}
def quux_impl(c: Ctx)(x: c.Expr[Int]): c.Expr[Int] = {
import c.universe._
c.Expr(q"$x + 3")
}
}
|