blob: 61db5c4a9b85b5c888373d1303de404c18f44085 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import scala.reflect.macros.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
c.Expr[Unit](body)
}
def fooFoo(c: Ctx) = {
import c.universe._
val body = Select(Ident(newTermName("Macros")), newTermName("foo"))
c.Expr[Unit](body)
}
}
|