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